Changeset View
Standalone View
films/templates/films/about.html
| {% extends 'films/base_films.html' %} | {% extends 'common/base.html' %} | ||||
| {% load film_extras %} | |||||
| {% block secondary_nav %} | |||||
| <div class="navbar-secondary"> | |||||
| <div class="content-holder"> | |||||
| <div class="container-xl"> | |||||
| <div class="list-group list-group-flush list-group-horizontal small side-scroll"> | |||||
| <a class="list-group-item" href="{% url 'film-detail' film_slug=flatpage.title|slugify %}"> | |||||
| {{ flatpage.title }} | |||||
| </a> | |||||
| <a class="list-group-item active" href=""> | |||||
| About | |||||
| </a> | |||||
| <a class="list-group-item" href="{% url 'film-gallery' film_slug=flatpage.title|slugify %}"> | |||||
| Gallery | |||||
| </a> | |||||
| <a class="list-group-item" href="{% url 'film-production-logs' film_slug=flatpage.title|slugify %}"> | |||||
sybren: The same string is slugified multiple times while rendering this page. Wouldn't it be better to… | |||||
| Weeklies | |||||
| </a> | |||||
| </div> | |||||
| </div> | |||||
| </div> | |||||
| </div> | |||||
| {% endblock secondary_nav %} | |||||
| {% block content %} | {% block content %} | ||||
| <div class="container-xl pt-4"> | |||||
| <section class="mb-4"> | |||||
| <div class="row justify-content-center mb-3"> | |||||
| <div class="col-md-6 text-center"> | |||||
| <h2 class="mb-0">{{ flatpage.title }}</h2> | |||||
| </div> | |||||
| </div> | |||||
| <div>{{ flatpage.content|markdown_to_html }}</div> | |||||
sybrenUnsubmitted Done Inline ActionsSimilar question as above: wouldn't it be lighter to just markdownify the flatpage content once on saving and store it in the DB? That'll make it lighter to render the page. Another advantage is that such an approach makes it easier to change the MarkDown library/options/extras/etc. without having to worry about older pages breaking. By converting to HTML on save, only those pages that have the attention of a person will be updated, which means that such breakage has a chance of being noticed. sybren: Similar question as above: wouldn't it be lighter to just markdownify the flatpage content once… | |||||
natkaAuthorUnsubmitted Done Inline ActionsThis is a very good point. natka: This is a very good point.
I assumed that we want to store the markdown-formatted content in… | |||||
| </section> | |||||
| </div> | |||||
| {% endblock content %} | {% endblock content %} | ||||
| No newline at end of file | |||||
The same string is slugified multiple times while rendering this page. Wouldn't it be better to do this on the flatpage object, so that it can be cached?