﻿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
15387	Parameter parse_until doesn't compare to tag name.	klein4	klein4	"django.template.Parser.parse() takes an argument `parse_until`, which the docs say is a tuple of tag names which indicate that parsing should halt. However, when Parser.parse() finds a new token of token_type=TOKEN_BLOCK, it tests `token.contents in parse_until` rather than `token.contents.split_token()[0] in parse_until`. The latter more closely matches the documented functionality.

This distinction is relevant when tokens after the initial tag contain arguments.

To see why this is useful, consider a custom block tag `random` which randomly chooses a nodelist according to its weight. It might be invoked like this:

{% random ""2"" %}
This node has a 2/7 chance of being chosen.
{% or ""2"" %}
This node has a 2/7 chance of being chosen.
{% or ""3"" %}
This node has a 3/7 chance of being chosen.
{% endrandom %}

As it currently stands, it is impossible to give non-initial tokens arguments as in this example. This may be considered a non-trivial patch, but it seems to align with the documented functionality of the `parse_until` parameter."		closed	Template system	1.2		duplicate	template, template tag, parser		Unreviewed	1	0	0	0	0	0
