﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
31484	Possibility to provide additional Context to Render a FlatPage.	thaxy	nobody	"Hello,

In one of my projects, I am using the Django flatpages app/feature. This worked fine so far but I have stumbled across a use case where I want to {% include %} another template within the template of my flatpage. The included template requires additional context data to work correctly.

The current implementation of the render function of the flatpage doesn't allow the developer to add additional context data other than the flatpage itself. (see: https://github.com/django/django/blob/master/django/contrib/flatpages/views.py#L69).

One solution could be to allow additional `**kwargs` to be passed to the render_flatpage function eventually being used to call the template.render function.

Is this worth thinking about? In my opinion, this could be an improvement - that's why I am writing to you. I could also try to create a PR according to the guidelines if you think this is an improvement.

Some code to illustrate the problem:

**urls.py:**
{{{
path('texte/', views.flatpage, {'url': '/texte/'}, name='texte')
}}}



**texte.html:**
{{{
{% extends 'base.html' %}

{% block content %}
<div class=""content"">
    {{ flatpage.content }}
</div>
{% include 'texte/uebersicht.html' %}
{% endblock content %}
}}}


**texte/uebersicht.html:**
{{{

<ul>
    {% for p in prosa %}  <!-- prosa is a queryset -->
        <li>
            <a href=""{% url 'prosa' p.slug %}"">{{ p }}</a>
        </li>
    {% empty %}
        keine inhalte gefunden
    {% endfor %}
</ul>
}}}
"	New feature	closed	contrib.flatpages	dev	Normal	wontfix	flatpage context template render		Unreviewed	0	0	0	0	0	0
