Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#30598 closed Cleanup/optimization (wontfix)

Create new files when overriding the default admin site.

Reported by: Wayne Lambert Owned by: nobody
Component: Documentation Version: 2.2
Severity: Normal Keywords: admin, override
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Hi,

When I read the section in the docs called 'Overriding the default admin site', I was left wondering whether I needed to create an admin.py and apps.py file within the project folder. Let me explain...

Because a Django project has the folder level which contains settings.py and wsgi.py but does not contain apps.py and admin.py by default, but the documents say 'myproject/admin.py' (in the code block headings), this led me to believe that files needed to be created within the project folder (i.e. in the same location as settings.py).

If it is the intention to create new files in this location, I think the docs should say 'create new files called ...'

If it is the intention that it is an app's admin.py and apps.py files that should be amended, then I think that the block of code should have the headers of myapp/admin.py and myapp/apps.py

Docs Location: https://docs.djangoproject.com/en/2.2/ref/contrib/admin/#overriding-the-default-admin-site

Change History (2)

comment:1 by Mariusz Felisiak, 5 years ago

Component: contrib.adminDocumentation
Easy pickings: unset
Resolution: wontfix
Status: newclosed
Summary: Overriding the default admin siteCreate new files when vverriding the default admin site.

Thanks for the report. However I don't think that it requires clarification, it is a preferable option to create these files in a project directory. Moreover it's not a beginner use case or a part of tutorial and both paths and content are correct.

comment:2 by Mariusz Felisiak, 5 years ago

Summary: Create new files when vverriding the default admin site.Create new files when overriding the default admin site.
Note: See TracTickets for help on using tickets.
Back to Top