Opened 12 years ago

Closed 12 years ago

#20309 closed Uncategorized (fixed)

File admin.py needs to be created first

Reported by: Katya <internum.odium@…> Owned by: nobody
Component: Documentation Version: 1.5
Severity: Normal Keywords:
Cc: bmispelon@… Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description

https://docs.djangoproject.com/en/1.5/intro/tutorial02/#make-the-poll-app-modifiable-in-the-admin

Just one thing to do: we need to tell the admin that Poll objects have an admin interface. To do this, open the polls/admin.py file, and edit it to look like this:

At that point the file admin.py doesn't exist yet. I'd suggest adding a note saying that the file needs to be created first.

Change History (6)

comment:1 by Baptiste Mispelon, 12 years ago

Cc: bmispelon@… added
Easy pickings: set
Triage Stage: UnreviewedAccepted
Version: 1.41.5

I believe you are correct.

Note however that this only applies to 1.5 since admin.py is created automatically with the new app template (this was added in commit 3f1c7b70537330435e2ec2fca9550f7b7fa4372e).

Thanks for your report.

comment:2 by Aymeric Augustin, 12 years ago

Resolution: invalid
Status: newclosed

You're following the tutorial for the development version (future 1.6) while using Django 1.5.

Please follow the tutorial for the version of Django you're using.

comment:3 by Aymeric Augustin, 12 years ago

Resolution: invalid
Status: closednew

Oops, I didn't notice that the link pointed to the 1.5 docs. Sorry. Thank you bmispelon.

comment:4 by Baptiste Mispelon, 12 years ago

For reference, this issue was introduced by commit 6e3b80239e9a066ac2e9d10212196acbc2e6d35c.

comment:5 by Aymeric Augustin, 12 years ago

#20345 and #20334 were duplicates.

comment:6 by Claude Paroz <claude@…>, 12 years ago

Resolution: fixed
Status: newclosed

In 4f10b35a2e4012512ae57cadd19f34ec8d4979a1:

[1.5.x] Fixed #20309 -- admin.py is not automatically created in Django 1.5

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