Commit a9b49d42 authored by Paul Pacheco's avatar Paul Pacheco

Fix code style

parent 7080efcb
......@@ -29,9 +29,9 @@ class Command(BaseCommand):
help = 'setups admin user with admin password (INSECURE!)'
def make_password(self, length) :
chars = string.ascii_letters + string.digits + '!@#$%^&*()'
random.seed = (os.urandom(1024))
return ''.join(random.choice(chars) for i in range(length))
chars = string.ascii_letters + string.digits + '!@#$%^&*()'
random.seed = (os.urandom(1024))
return ''.join(random.choice(chars) for i in range(length))
def handle(self, *args, **options):
'''
......@@ -40,12 +40,9 @@ class Command(BaseCommand):
This is useful mostly for setup inside appliances, when user wants
to be able to login remotely and change password then.
'''
password = self.make_password(13);
self.stdout.write('Creating user admin with password ' + password )
password = self.make_password(13)
self.stdout.write('Creating user admin with password ' + password)
user = User.objects.create_user('admin', 'admin@example.com', password)
user.first_name = 'Weblate Admin'
user.last_name = ''
......
Markdown is supported
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