Opened 9 years ago
Closed 9 years ago
#26501 closed New feature (duplicate)
Docs for reusable apps is missing {% extends "base.html" %}
Reported by: | Thomas Güttler | Owned by: | nobody |
---|---|---|---|
Component: | Documentation | Version: | 1.9 |
Severity: | Normal | Keywords: | |
Cc: | tzanke@… | Triage Stage: | Unreviewed |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description (last modified by )
I am missing some information on this page:
If a reusableapp wants to render a whole page, how to do this?
I like the solution from here: http://stackoverflow.com/a/36552447/633961
The resusable app uses this in all its templates: {% extends "myreusableapp/base.html" %}
And myreusableapp/base.html
looks like this:
{% extends "base.html" %}
This is the way django-allauth works and I guess some other apps, too.
Please include this (or a better way) in the docs.
Change History (4)
comment:1 by , 9 years ago
Summary: | Docs for reusable apps is missing {% extends "mypp/base.html" %} → Docs for reusable apps is missing {% extends "base.html" %} |
---|
comment:2 by , 9 years ago
Description: | modified (diff) |
---|
comment:3 by , 9 years ago
Cc: | added |
---|
comment:4 by , 9 years ago
Resolution: | → duplicate |
---|---|
Status: | new → closed |
Type: | Uncategorized → New feature |
Note:
See TracTickets
for help on using tickets.
In general, I think it's difficult for apps to provide sufficiently generic templates that will integrate into a site's layout. Some have proposed some common conventions that may work to some extent but in my opinion trying to provide reusable templates shouldn't be a big emphasis of reusable apps.
That said, the idea has come up before, so marking as a duplicate of #19106.