I'm using django flatpages, and I'm wondering if there is a concise way of loading one specific flatpage within a template. The docs show the following patterns:
{% load flatpages %}
{% get_flatpages '/about/' as about_pages %}
{% get_flatpages about_prefix as about_pages %}
{% get_flatpages '/about/' for someuser as about_pages %}
I just want to load one specific page in a template, essentially using it like an include statement (e.g. {% include 'homepage.html' %}
)
The approach I am using is this:
{% get_flatpages '/flat-homepage/' as flatpages %}
{{ flatpages.first.content|safe }}
This works fine, but I thought there might be a slightly neater way of doing this. I'm marking the content as safe
as I want html styles to be applied (again, not sure if there is a better way of doing this)