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 Thomas Güttler)

I am missing some information on this page:

https://docs.djangoproject.com/en/1.9/intro/reusable-apps/

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 Thomas Güttler, 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 Thomas Güttler, 9 years ago

Description: modified (diff)

comment:3 by TZanke, 9 years ago

Cc: tzanke@… added

comment:4 by Tim Graham, 9 years ago

Resolution: duplicate
Status: newclosed
Type: UncategorizedNew feature

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.

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