Code

Opened 7 years ago

Closed 6 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@…> 7 years ago.
5614.2.patch (1.3 KB) - added by Collin Grady <cgrady@…> 6 years ago.
5614.3.patch (5.9 KB) - added by Collin Grady <cgrady@…> 6 years ago.
create_superuser.diff (10.7 KB) - added by Øyvind Saltvik <oyvind@…> 6 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@…> 6 years ago.
Forgot to svn add init.py
create_superuser.3.diff (13.5 KB) - added by Øyvind Saltvik <oyvind@…> 6 years ago.
After seeing the discussion on django-developers made create_superuser.py backwards compatible
5614-docs.patch (1.2 KB) - added by programmerq 6 years ago.
Docs for this handy patch
5614-checkin.patch (20.9 KB) - added by programmerq 6 years ago.
combined patch-- with spelling errors fixed

Download all attachments as: .zip

Change History (17)

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

comment:1 Changed 7 years ago by SmileyChris

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Design 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 6 years ago by Collin Grady <cgrady@…>

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

Updated patch to drop the --password arg

comment:3 Changed 6 years ago by jacob

  • Triage Stage changed from Design decision needed to Ready for checkin

comment:4 Changed 6 years ago by adrian

  • Needs documentation set
  • Triage Stage changed from Ready for checkin to Accepted

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

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

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

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

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

Forgot to svn add init.py

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

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

Changed 6 years ago by programmerq

Docs for this handy patch

comment:5 Changed 6 years ago by programmerq

  • 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 6 years ago by SmileyChris

  • Triage Stage changed from Accepted to Ready 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 6 years ago by programmerq

combined patch-- with spelling errors fixed

comment:7 Changed 6 years ago by programmerq

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 6 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 6 years ago by jacob

  • Resolution set to fixed
  • Status changed from new to closed

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

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.