Opened 9 years ago

Closed 8 years ago

#5614 closed (fixed)

Add createsuperuser management command to auth

Reported by: Collin Grady <cgrady@…> Owned by: nobody
Component: Contrib apps Version: master
Severity: Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

Since we can now add custom commands through apps, auth could provide a createsuperuser command

Attachments (8)

5614.patch (1.4 KB) - added by Collin Grady <cgrady@…> 9 years ago.
5614.2.patch (1.3 KB) - added by Collin Grady <cgrady@…> 9 years ago.
5614.3.patch (5.9 KB) - added by Collin Grady <cgrady@…> 9 years ago.
create_superuser.diff (10.7 KB) - added by Øyvind Saltvik <oyvind@…> 9 years ago.
Refactored and fixed signals being registered twice in management/init.py
create_superuser.2.diff (13.4 KB) - added by Øyvind Saltvik <oyvind@…> 9 years ago.
Forgot to svn add init.py
create_superuser.3.diff (13.5 KB) - added by Øyvind Saltvik <oyvind@…> 9 years ago.
After seeing the discussion on django-developers made create_superuser.py backwards compatible
5614-docs.patch (1.2 KB) - added by Jeff Anderson 8 years ago.
Docs for this handy patch
5614-checkin.patch (20.9 KB) - added by Jeff Anderson 8 years ago.
combined patch-- with spelling errors fixed

Download all attachments as: .zip

Change History (17)

Changed 9 years ago by Collin Grady <cgrady@…>

Attachment: 5614.patch added

comment:1 Changed 9 years ago by Chris Beaven

Needs documentation: unset
Needs tests: unset
Patch needs improvement: unset
Triage Stage: UnreviewedDesign decision needed

I'm not that keen on letting users put the unhashed superuser password on their bash history. My suggestion is that the password is removed as an option, therefore requiring it to be prompted for.

Changed 9 years ago by Collin Grady <cgrady@…>

Attachment: 5614.2.patch added

comment:2 Changed 9 years ago by Collin Grady <cgrady@…>

Updated patch to drop the --password arg

comment:3 Changed 9 years ago by Jacob

Triage Stage: Design decision neededReady for checkin

comment:4 Changed 9 years ago by Adrian Holovaty

Needs documentation: set
Triage Stage: Ready for checkinAccepted

This is a nice addition, but it needs docs before we can check it in. Who wants to tackle them?

Changed 9 years ago by Collin Grady <cgrady@…>

Attachment: 5614.3.patch added

Changed 9 years ago by Øyvind Saltvik <oyvind@…>

Attachment: create_superuser.diff added

Refactored and fixed signals being registered twice in management/init.py

Changed 9 years ago by Øyvind Saltvik <oyvind@…>

Attachment: create_superuser.2.diff added

Forgot to svn add init.py

Changed 9 years ago by Øyvind Saltvik <oyvind@…>

Attachment: create_superuser.3.diff added

After seeing the discussion on django-developers made create_superuser.py backwards compatible

Changed 8 years ago by Jeff Anderson

Attachment: 5614-docs.patch added

Docs for this handy patch

comment:5 Changed 8 years ago by Jeff Anderson

Needs documentation: unset

Hello. I've written up the docs that reflect the changes.

I was able to merge create_superuser.3.diff with the current svn trunk without problems.

comment:6 Changed 8 years ago by Chris Beaven

Triage Stage: AcceptedReady for checkin

programmerq: couple of typos (usermane, filesestem) so check those when you're documenting. Thanks for the update that the merge is still fine. I think we're ready to promote (but feel free to put a fixed doc patch up and perhaps combine with the actual code patch - it's easy then for the committer).

Changed 8 years ago by Jeff Anderson

Attachment: 5614-checkin.patch added

combined patch-- with spelling errors fixed

comment:7 Changed 8 years ago by Jeff Anderson

I am in fact a terrible speller, but not that bad. I must have been sleepy when I wrote those up. :)

I've fixed the errors, and looked over my changes again. It should be good to go!

comment:8 Changed 8 years ago by Jacob

Be careful generating your patches, programerq: this one was generated in "reverse". Luckily it applies fine with a patch -R, but it confused the heck out of me first!

comment:9 Changed 8 years ago by Jacob

Resolution: fixed
Status: newclosed

(In [7590]) Fixed #5614: added 'manage.py createsuperuser'. Thanks, programmerq.

Note: See TracTickets for help on using tickets.
Back to Top