Files
zulip/zephyr/management/commands/print_initial_password.py
Keegan McAllister 8a1ba0d720 Add a management command to print the initial password for an account
(imported from commit 0a2b7d8215961801dbd24d9af89785e857b9ba14)
2012-10-17 18:23:01 -04:00

14 lines
505 B
Python

from django.core.management.base import BaseCommand
from zephyr.lib.initial_password import initial_password
class Command(BaseCommand):
help = "Print the initial password for accounts as created by populate_db"
def handle(self, *args, **options):
print
for email in args:
if '@' not in email:
print 'ERROR: %s does not look like an email address' % (email,)
continue
print '%-30s %-16s' % (email, initial_password(email))