forked from django-extensions/django-extensions
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added in Colin Grady's createsuperuser command and added an authors f…
…ile. Cleaned up the generate_secret_key
- Loading branch information
Showing
4 changed files
with
24 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters