﻿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
24232	Add conditional expressions to block tag	Markus Amalthea Magnuson	nobody	"It would be nice if I could add a conditional expression after a block name, mimicking the shortcut conditional expression form in Python, to only render a block if a certain condition is true. So instead of writing e.g. this:

{{{
{% block title %}
  {% if post.title %}
    {{ post.title }}
  {% else %}
    {{ block.super }}
  {% endif %}
{% endblock %}
}}}

I could write this:

{{{
{% block title if post.title %}My title{% endif%}
}}}

See also #9173 ([https://code.djangoproject.com/ticket/9173#comment:9 comment 9]) where I first thought of this.

I have some working proof of concept code and could open a pull request to start working on this, if accepted."	New feature	closed	Template system	dev	Normal	wontfix			Unreviewed	0	0	0	0	0	0
