#23575: Add a code example for custom AdminSite
--------------------------------------+------------------------------------
Reporter: hernandocounty | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Documentation | Version: 1.7
Severity: Normal | Resolution:
Keywords: TEMPLATES_DIR | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by timgraham):
* component: Template system => Documentation
* type: New feature => Cleanup/optimization
* easy: 0 => 1
* stage: Unreviewed => Accepted
Comment:
I probably wouldn't include the alternative in the tutorial itself since
`site_header` is already linked to the admin docs. The instructions are on
that page:
"If you’d like to set up your own administrative site with custom
behavior, however, you’re free to subclass AdminSite and override or add
anything you like. Then, simply create an instance of your AdminSite
subclass (the same way you’d instantiate any other Python class), and
register your models and ModelAdmin subclasses with it instead of using
the default."
but a code example would be helpful.
I'd guess maybe you didn't setup the directory structure quite right in
order for template overriding to work. It should be
`mysite/templates/admin` and not `mysite/mysite/templates/admin`.
--
Ticket URL: <https://code.djangoproject.com/ticket/23575#comment:9>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/072.88ae5b9ae7aefe4f412609a4171a8852%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.