#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 Changed 14 years ago by
Component: | Uncategorized → Documentation |
---|
comment:2 Changed 14 years ago by
Owner: | changed from nobody to thegrandconjuration |
---|---|
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 Changed 14 years ago by
Wait, why did this thing just assign *me* the ticket? I only registered to post this...
comment:4 Changed 14 years ago by
Owner: | changed from thegrandconjuration to nobody |
---|---|
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.
Changed 14 years ago by
Attachment: | adding-admin.diff added |
---|
Patch to fix the apparently confusing instructions.
comment:5 Changed 14 years ago by
Has patch: | set |
---|
comment:7 Changed 14 years ago by
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 Changed 14 years ago by
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 Changed 14 years ago by
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 Changed 14 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:12 Changed 9 years ago by
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.