Firstrun angepasst
This commit is contained in:
parent
b2b257807d
commit
a591e34af4
|
|
@ -0,0 +1,18 @@
|
||||||
|
from django.contrib.auth.models import User
|
||||||
|
from users.models import Profile,Agency
|
||||||
|
ag=Agency()
|
||||||
|
ag.save()
|
||||||
|
pr=Profile()
|
||||||
|
pr.agency=ag
|
||||||
|
try:
|
||||||
|
user=User.objects.create_user('root', 'support@digitale-agentur.com', 'Penis!!!LOL')
|
||||||
|
except:
|
||||||
|
user = User.objects.get(username='root')
|
||||||
|
user.first_name = 'ROOT'
|
||||||
|
user.last_name = 'ROOT'
|
||||||
|
pr.user=user
|
||||||
|
pr.save()
|
||||||
|
user.profile = pr
|
||||||
|
user.is_superuser = True
|
||||||
|
user.is_stuff = True
|
||||||
|
user.save()
|
||||||
Loading…
Reference in New Issue