Opened 11 years ago
Last modified 11 years ago
#21712 closed Cleanup/optimization
Move admin.autodiscover() to AppConfig.setup() — at Version 1
Reported by: | Aymeric Augustin | Owned by: | nobody |
---|---|---|---|
Component: | contrib.admin | Version: | dev |
Severity: | Normal | Keywords: | app-loading |
Cc: | Triage Stage: | Ready for checkin | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description (last modified by )
It doesn't belong to urls.py!
This probably requires shipping an apps.py with an AppConfig in the default project template and adding lots of documentation, including in the tutorial.
Note:
See TracTickets
for help on using tickets.
In fact, we don't have a good API for project-level startup code. Many projects have a "project app" for projectwide templates, staticfiles, etc. but the tutorial doesn't. This requires a bit more thought.