#8891 closed Uncategorized (fixed)
Tutorial part 2 should not tell to edit an admin.py file that doesn't exist.
Reported by: | thegrandconjuration | Owned by: | nobody |
---|---|---|---|
Component: | Documentation | Version: | 1.0 |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Accepted | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
"Just one thing to do: We need to tell the admin that Poll objects have an admin interface. Edit the mysite/polls/admin.py file and add the following to the bottom of the file:"
No admin.py is created by python manage.py startapp polls. This should refer to 'mysite/polls/models.py'.
Attachments (1)
Change History (13)
comment:1 by , 16 years ago
Component: | Uncategorized → Documentation |
---|
comment:2 by , 16 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
Ok, thanks for the clarification. I'm new to Django and was following the tutorial.
I put all the code there into the models.py and it worked, so I was assuming the documentation was in error.
All my other attempts at Django (including buying Practical Django Projects last month) went nowhere due to excessive documentation errors/incompatibilities. I was hoping 1.0 would be different and actually usable...
comment:3 by , 16 years ago
Wait, why did this thing just assign *me* the ticket? I only registered to post this...
comment:4 by , 16 years ago
Owner: | changed from | to
---|---|
Status: | assigned → new |
Summary: | error in part 2 of the Writing Your First Django App tutorial → Tutorial part 2 should not tell to edit an admin.py file that doesn't exist. |
Triage Stage: | Unreviewed → Accepted |
Changing the summary to describe what the issue.
by , 16 years ago
Attachment: | adding-admin.diff added |
---|
Patch to fix the apparently confusing instructions.
comment:5 by , 16 years ago
Has patch: | set |
---|
comment:7 by , 16 years ago
Btw, as the admin.py
file did not exist up to this point, it will be necessary to restart the development server. Might be worth noting.
comment:9 by , 16 years ago
And do you also need to document how to get the newly created admin.py file included with the rest of your application? Just creating the file and restarting the server does not make it work. I assume it should be included someplace, but where?
comment:10 by , 16 years ago
Restarting the server should do it. admin.autodiscover() loads the admin.py files for INSTALLED_APPS, and the tutorial already covers adding autodiscover() to urls.py:
http://docs.djangoproject.com/en/dev/intro/tutorial02/#activate-the-admin-site
comment:11 by , 16 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:12 by , 12 years ago
Easy pickings: | unset |
---|---|
Severity: | → Normal |
Type: | → Uncategorized |
UI/UX: | unset |
has this been completed yet?
No, it should say something like "Create the file mysite/polss/admin.py and add ...". You don't store the admin specific stuff in models.py.