add timezone in user profile

This commit is contained in:
virusdefender
2017-01-24 13:21:49 +08:00
parent d9fad97e35
commit d1e505dc24
3 changed files with 10 additions and 1 deletions

View File

@@ -32,7 +32,7 @@ class Command(BaseCommand):
rand_password = "rootroot"
user.set_password(rand_password)
user.save()
UserProfile.objects.create(user=user)
UserProfile.objects.create(user=user, time_zone="Asia/Shanghai")
self.stdout.write(self.style.SUCCESS("Successfully created super admin user.\n"
"Username: root\nPassword: %s\n"
"Remember to change password and turn on two factors auth "