Re: Proposal: The 'use' template tag, a cross between 'include' and 'extends'.

2014-09-04 Thread Sam Willis
Hi again, One thing that I wasn't happy with in the implementation I posted yesterday was that you could not override templates included using 'use' in another child template. Effectively all blocks inside the 'use' tag and its included template where invisible outside of it. This needed to be

Re: Proposal: The 'use' template tag, a cross between 'include' and 'extends'.

2014-09-04 Thread Sam Willis
Curtis, You are welcome to include it in your project and I'm happy to help out. Depending on what happens here I may still release it as a simple standalone app though. I do think this is the kind of thing that would do best in core though as it would ensure that there was a standardised

Re: Proposal: The 'use' template tag, a cross between 'include' and 'extends'.

2014-09-04 Thread Marc Tamlyn
I would like to see someone do a review of the various third party implementations of concepts like this, I think there's a place in core for some variant, it's just working out which one the "right" one is. The other issue with adding new tags to core (especially with "common" names) is name

Re: Proposal: The 'use' template tag, a cross between 'include' and 'extends'.

2014-09-04 Thread Josh Smeaton
I really like this idea, and have wanted something similar every time I start a new project and begin building out the main template. I think including this (or something like this) in core is a great idea. Just because it *can* be implemented in 3rd party code, doesn't mean it has to be. On

Re: Proposal: The 'use' template tag, a cross between 'include' and 'extends'.

2014-09-03 Thread Curtis Maloney
Interesting idea... so much so I'd like to steal it :) However, since it can be implemented as a 3rd party app, I suspect you'll get some push-back from trying to get it into core. I've recently started work to reimagine my "sniplates" project [ https://bitbucket.org/funkybob/django-sniplates],

Re: Proposal: The 'use' template tag, a cross between 'include' and 'extends'.

2014-09-03 Thread Sam Willis
If this was to be an addition to 'include' it would result in it having an optional closing tag, that seems a little confusing and you would need an argument to flag that there are blocks to override (and parse until the 'endinclude'). The advantage over Jonathans 'decorate' tag is that you

Re: Proposal: The 'use' template tag, a cross between 'include' and 'extends'.

2014-09-03 Thread Jonathan Slenders
From 2011: https://github.com/vikingco/django-template-tags/blob/master/src/django_template_tags/templatetags/decorate.py My proposal was refused back then, but I'll be very happy if something similar would make it. :) Le mercredi 3 septembre 2014 18:42:44 UTC+2, Jonathan Slenders a écrit :