>
> This is a common pattern in Django, but I couldn't find any documentation
> that supports it. Hopefully someone else can reference a reputable source
> that explains it.


The django tutorial
<https://docs.djangoproject.com/en/stable/intro/tutorial03/> has a section
on "Template namespacing". There's a similar section on "Static file
namespacing" in part 6.

On Mon, Aug 1, 2016 at 7:56 PM, Eduardo Rivas <[email protected]>
wrote:

> Django templates don't work with absolute paths (or if they do, it's not a
> good idea for portability). The templates you want to refer to in {%
> extends %} are relative to the templates/ directory in each installed app.
>
> Since all templates/ directories from all apps are combined into one
> "pool", you should always reuse the application name inside the templates/
> folder. For example, for your nektra template, the base.html file should be
> at nektra/templates/nektra/base.html. And then you can extend it with {%
> extends "nektra/base.html" %}.
>
> The same goes for your coinfabrik application. The base template should be
> in coinfabrik/templates/coinfabrik/base.html, and you can then reference it
> in templates as "coinfabrik/base.html".
>
> This is a common pattern in Django, but I couldn't find any documentation
> that supports it. Hopefully someone else can reference a reputable source
> that explains it.
>
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Mezzanine Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Mezzanine Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to