In terms of best practices for Django templates, I recommend that you
try to use template inheritance extensively, in similar ways as when
you would use subclassing:
- Create a base.html template with everything that appears in all your
pages (common header and footer, generic html headers...).
-
> 1. Should I great an app only for this purpose, in the sense, an app will
> host a header and footer functions (methods) along with their views. Is that
> the best practice?
You can use {% include "snippet.html" %} or a {% block name %}Default
template in your base template that you extend{% en
Hi,
I'm wondering what would be the best practice for templating in django. I
plan on having a single theme in which heads and footers will almost be the
same across my project,
1. Should I great an app only for this purpose, in the sense, an app will
host a header and footer functions (methods)
3 matches
Mail list logo