Re: Feature proposal: escape hatch for colliding template syntax in django templates

2011-02-05 Thread Mantas
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I propose this solution: {!x x} Or at least: {% verbatim x %} {% x %} Where 'x' can be replaced by any other string: {!! {!x x} !} {!xx {!x x} xx} {!maystring {!x x} maystring} {% verbatim - %} {% verbatim x %} {

Re: Feature proposal: escape hatch for colliding template syntax in django templates

2010-10-20 Thread Johannes Dollinger
Am 20.10.2010 um 10:40 schrieb Andrew Godwin: > On 20/10/10 02:40, Stephen Kelly wrote: >> Sorry. Sent too early. All thumbs today. Consider these examples: >> >> {% verbatim "%} %}" %} >> >> (That is, "%} %}" in a verbatim-no-end tag) >> >> {% verbatim %} %} %} {% endverbatim %} >> >> (That

Re: Feature proposal: escape hatch for colliding template syntax in django templates

2010-10-20 Thread Andrew Godwin
On 20/10/10 02:40, Stephen Kelly wrote: Sorry. Sent too early. All thumbs today. Consider these examples: {% verbatim "%} %}" %} (That is, "%} %}" in a verbatim-no-end tag) {% verbatim %} %} %} {% endverbatim %} (That is, " %} %} " wrapped in verbatim tags) The current lexer uses regexps to

Re: Feature proposal: escape hatch for colliding template syntax in django templates

2010-10-20 Thread David Danier
> If we're going to do this, could we also look at deprecating the > 'templatetag' template tag? There are a couple cases a 'verbatim' tag > wouldn't cover that 'templatetag' wouldn't, but I'm kinda hard-pressed > to think of when they'd ever come up in reality. +1 for this. I for one don't even u

Re: Feature proposal: escape hatch for colliding template syntax in django templates

2010-10-19 Thread Stephen Kelly
Stephen Kelly wrote: > Stephen Kelly wrote: > >> Łukasz Rekucki wrote: >> >>> On 19 October 2010 23:41, Jacob Kaplan-Moss >>> wrote: On Tue, Oct 19, 2010 at 4:31 PM, James Bennett wrote: > If we're going to do this, could we also look at deprecating the > 'templatetag' templa

Re: Feature proposal: escape hatch for colliding template syntax in django templates

2010-10-19 Thread Stephen Kelly
Stephen Kelly wrote: > Łukasz Rekucki wrote: > >> On 19 October 2010 23:41, Jacob Kaplan-Moss >> wrote: >>> On Tue, Oct 19, 2010 at 4:31 PM, James Bennett >>> wrote: If we're going to do this, could we also look at deprecating the 'templatetag' template tag? There are a couple cases a

Re: Feature proposal: escape hatch for colliding template syntax in django templates

2010-10-19 Thread Stephen Kelly
Łukasz Rekucki wrote: > On 19 October 2010 23:41, Jacob Kaplan-Moss > wrote: >> On Tue, Oct 19, 2010 at 4:31 PM, James Bennett >> wrote: >>> If we're going to do this, could we also look at deprecating the >>> 'templatetag' template tag? There are a couple cases a 'verbatim' tag >>> wouldn't cov

Re: Feature proposal: escape hatch for colliding template syntax in django templates

2010-10-19 Thread Łukasz Rekucki
On 19 October 2010 23:41, Jacob Kaplan-Moss wrote: > On Tue, Oct 19, 2010 at 4:31 PM, James Bennett wrote: >> If we're going to do this, could we also look at deprecating the >> 'templatetag' template tag? There are a couple cases a 'verbatim' tag >> wouldn't cover that 'templatetag' wouldn't, bu

Re: Feature proposal: escape hatch for colliding template syntax in django templates

2010-10-19 Thread Jacob Kaplan-Moss
On Tue, Oct 19, 2010 at 4:31 PM, James Bennett wrote: > If we're going to do this, could we also look at deprecating the > 'templatetag' template tag? There are a couple cases a 'verbatim' tag > wouldn't cover that 'templatetag' wouldn't, but I'm kinda hard-pressed > to think of when they'd ever c

Re: Feature proposal: escape hatch for colliding template syntax in django templates

2010-10-19 Thread James Bennett
On Tue, Oct 19, 2010 at 1:49 PM, Jacob Kaplan-Moss wrote: > Looks like a good idea to me. I've certainly used ssi as a hack for > this before, so getting a noparse/verbatim tag into Django sounds > great. If we're going to do this, could we also look at deprecating the 'templatetag' template tag?

Re: Feature proposal: escape hatch for colliding template syntax in django templates

2010-10-19 Thread David Gouldin
Given 2 +1s, I've added a ticket: http://code.djangoproject.com/ticket/14502 On Oct 19, 6:49 pm, Jacob Kaplan-Moss wrote: > On Tue, Oct 19, 2010 at 12:24 PM, David Gouldin wrote: > > Thoughts/opinions? > > Looks like a good idea to me. I've certainly used ssi as a hack for > this before, so get

Re: Feature proposal: escape hatch for colliding template syntax in django templates

2010-10-19 Thread Jacob Kaplan-Moss
On Tue, Oct 19, 2010 at 12:24 PM, David Gouldin wrote: > Thoughts/opinions? Looks like a good idea to me. I've certainly used ssi as a hack for this before, so getting a noparse/verbatim tag into Django sounds great. Jacob -- You received this message because you are subscribed to the Google G

Re: Feature proposal: escape hatch for colliding template syntax in django templates

2010-10-19 Thread flo...@gmail.com
I agree that something like this is becoming more necessary, as I ran into this a few days ago myself. Funny how similar our strategies were (David's is more robust): http://gist.github.com/629508 -Eric Florenzano On Oct 19, 10:24 am, David Gouldin wrote: > As client-side templates become more p

Feature proposal: escape hatch for colliding template syntax in django templates

2010-10-19 Thread David Gouldin
As client-side templates become more popular, it is increasingly likely that django's template language will not be the only one present in a template. (jQuery's new template language makes frequent use of curly braces in its syntax.) At the same time, the assumption that all template syntax shou