﻿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
34883	Allow template tags to set extra data on templates.	Carlton Gibson	Carlton Gibson	"Custom template tags may need to pass additional data, beyond the node list, out of the parsing context, for later use, by (e.g.) the template loader, or other template clients. 

Currently this is only feasible by attaching data to the `origin` object, since that's the only object available to both the template and the parser, but this isn't pretty. 

I propose adding an additional attribute to the `Parser` that can be used by template tag authors to have extra data set on the template instance, that can then be used as needed. 

This ticket comes from the forum discussion on [https://forum.djangoproject.com/t/adding-template-fragments-or-partials-for-the-dtl/21500 Adding template fragments or partials for the DTL] — it is the necessary minimal first change to allow an official[*] API such that a library such as `django-template-partials` can pass named node lists out of the parser for later use. (I'd imagine it would be useful to other tag library authors once in play.)  

[*]: I say official, but I'm not sure whether to make this public — i.e. documented — it's pretty niche — those who need it'll find it. I'd be happy with a regression test making sure it didn't break but leaving it undocumented beyond that. Opinions welcome. 🙂"	New feature	closed	Template system	5.0	Normal	fixed		Florian Apolloner	Ready for checkin	1	0	0	0	0	0
