Commit 6fbb5a41 authored by Daniel Gal's avatar Daniel Gal
Browse files

Fixed populate script

parent b6dc789b
Pipeline #3804 failed with stage
in 6 minutes
......@@ -54,19 +54,25 @@ class Command(BaseCommand):
admin.last_name = "Adminsson"
admin.set_password("admin")
admin.save()
Profile.objects.create(user=User.objects.get(username="admin"))
Profile.objects.create(
user=User.objects.get(username="admin"), display_name="admin"
)
users.append("admin")
if not User.objects.filter(username="mod").exists():
User.objects.create(
username="mod", is_staff=True, first_name="Mod", last_name="Mod"
)
Profile.objects.create(user=User.objects.get(username="mod"))
Profile.objects.create(
user=User.objects.get(username="mod"), display_name="mod"
)
users.append("mod")
if not User.objects.filter(username="user").exists():
User.objects.create(username="user", first_name="User", last_name="User")
Profile.objects.create(user=User.objects.get(username="user"))
Profile.objects.create(
user=User.objects.get(username="user"), display_name="user"
)
users.append("user")
# Accounts
......@@ -80,7 +86,7 @@ class Command(BaseCommand):
u.last_name = name[1]
u.save()
# Profiles
Profile.objects.create(user=u)
Profile.objects.create(user=u, display_name=fakedata["username"])
users.append(u.username)
# Tags
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment