Skip to content

Commit

Permalink
added in Colin Grady's createsuperuser command and added an authors f…
Browse files Browse the repository at this point in the history
…ile. Cleaned up the generate_secret_key
  • Loading branch information
empty committed Dec 27, 2007
1 parent d247dbe commit 6a509f8
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 2 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2007 Eminent Consulting Group, LLC
Copyright (c) 2007 Michael Trier

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
5 changes: 5 additions & 0 deletions docs/AUTHORS
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
The following individuals have contributed to this project

Ludvig Ericson (aka Toxic)
Colin Grady (aka Magus)
Michael Trier (aka Empty)
18 changes: 18 additions & 0 deletions extensions/management/commands/createsuperuser.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
from django.core.management.base import NoArgsCommand
from optparse import make_option
from django.contrib.auth.create_superuser import createsuperuser

class Command(NoArgsCommand):
option_list = NoArgsCommand.option_list + (
make_option('--username', dest='username', default=None,
help='Specifies the username for the superuser.'),
make_option('--email', dest='email', default=None,
help='Specifies the email address for the superuser.'),
)
help = 'Used to create a superuser.'

def handle_noargs(self, **options):
username = options.get('username', None)
email = options.get('email', None)

createsuperuser(username=username, password=None, email=email)
1 change: 0 additions & 1 deletion extensions/management/commands/generate_secret_key.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ class Command(NoArgsCommand):
help = "Generates a new SECRET_KEY that can be used in a project settings file."

requires_model_validation = False
can_import_settings = True

def handle_noargs(self, **options):
return ''.join([choice('abcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*(-_=+)') for i in range(50)])

0 comments on commit 6a509f8

Please sign in to comment.