Hi,
Look at the flatpages docs.

https://docs.djangoproject.com/en/2.0/ref/contrib/flatpages/



2017-10-16 9:06 GMT-02:00 Bernd Wechner <bernd.wech...@gmail.com>:

> Curious and I admit lazy question as I don't even know where to look or
> how for such a general idea. But there it is, I'd like to be able to write
> a static HTML file (like say about.html) and render that inside of the
> sites style and basic template.
>
> So I have base.html for example, which contains say:
>
>     {% block content %}{% endblock %}
>
> and various views that start with:
>
>     {% extends "myapp/base.html" %}
>
> and define content blocks.
>
> I'd like a simple filter perhaps (or tag) which loads a nominated static
> html file but has some rudimentary smarts in its rendering. For example
> using the h1 text as a page title, and inserting a table of contents of ann
> the h2 and other headers with links to the respective sections. The static
> HTML file then need only declare the headers and texts and the template
> filter/tag would weave it together in such a manner.
>
> Is that a common sort of need, that;s been solved, and done? Just curious
> really. Seems a common need at my end ;-). Hence a classic application of
> the DRY principle, and generalizing the routine elements of Table of
> Contents building and linking.
>
> Regards,
>
> Bernd.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/django-users/22b3f568-d045-6d56-a31b-944e7cc7ac79%40gmail.com
> <https://groups.google.com/d/msgid/django-users/22b3f568-d045-6d56-a31b-944e7cc7ac79%40gmail.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CACTnJ03mngt8yutF6kpgdBGMuT_s6XnyoVy8696ktSaf8WfGgA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to