Opened 5 years ago

Closed 5 years ago

#22129 closed Cleanup/optimization (fixed)

super user creation prompts after executing migrate, not in tutorial

Reported by: kirby_agudelo Owned by: Greg Chapple
Component: Documentation Version: master
Severity: Normal Keywords: documentation
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


creating django app for the first time from source I followed steps in documentaion. after executing "migrate" command, i was prompted with

You have installed Django's auth system, and don't have any superusers defined.
Would you like to create one now? (yes/no):

it was not in documentation that such prompt will appear

here are the details

django version 1.7a2

used pdf document page 20 "Getting started"

created app1 with command

python startapp app1

edited to add app1

created models to from documentation

class Question( models.Model ):

question_test = models.CharField(max_length=200)
pub_date = models.DateTimeField('date_published')

class Choice(models.Model):

question = models.ForeignKey(Question)
choice_text = models.CharField(max_length=200)

execute makemigrations

python makemigrations app1

execute migrate

python migrate


Operations to perform:

Synchronize unmigrated apps: admin, contenttypes, auth, sessions
Apply all migrations: app1

Synchronizing apps without migrations:

Creating tables...
Installing custom SQL...
Installing indexes...

Running migrations:

No migrations needed.

You have installed Django's auth system, and don't have any superusers defined.
Would you like to create one now? (yes/no):

automates user creation but i dont want to create user yet. maybe some kind of switch will be nice to bypass this when executing "migrate"

upon executing migrate for simple models, i was prompted to create user (not in docs)

Change History (5)

comment:1 Changed 5 years ago by Baptiste Mispelon

Resolution: worksforme
Status: newclosed


Are you sure you're following the version of the documentation that corresponds to the Django version you're using?

The page at states that (emphasis mine):

The migrate command looks at the INSTALLED_APPS setting and creates any necessary database tables according to the database settings in your mysite/ file and the database migrations shipped with the app (we’ll cover those later). You’ll see a message for each migration it applies, and you’ll get a prompt asking you if you’d like to create a superuser account for the authentication system. Go ahead and do that.


comment:2 Changed 5 years ago by Russell Keith-Magee

Resolution: worksforme
Status: closednew
Triage Stage: UnreviewedAccepted
Type: BugCleanup/optimization

This issue was discovered during the sprints at PyCon.PH. On closer inspection, I agree that there is an existing reference to the fact that you'll be asked to create a super user; however, it's subtle. We had a couple of newcomers (including Kirby) running the tutorial for the first time, and they all got stuck on the same point. I think it's worth making this step crystal clear, possibly with an example snippet of what you'd expect to see from the console.

comment:3 Changed 5 years ago by Greg Chapple

Owner: changed from nobody to Greg Chapple
Status: newassigned

comment:4 Changed 5 years ago by Greg Chapple

Has patch: set

Created pull request for this ticket:

comment:5 Changed 5 years ago by Tim Graham <timograham@…>

Resolution: fixed
Status: assignedclosed

In 2f25cdc18a3c15dd9feb9daa522f41aac39e232b:

Fixed #22129 -- Added steps for creating superusers to tutorial.

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