On 9/14/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> On Sep 14, 11:29 am, "Jonathan Buchanan" <[EMAIL PROTECTED]>
> wrote:
> > Pesky kids these days, with your music and your anticipation...
>
> :-)
>
> > I agree that what you propose here would be useful in the scenario
> > you've described. *Personally*, if I wanted something like that, I'd
> > just write a function to do it and use it on my tag arguments.
> >
> > Quick and dirty implementation (assuming the template library will
> > allow you to pass your example tag arguments as-is):
> >
> >     expression_re = re.compile(r'\$\{ *([a-z0-9\._]+) *\}')
> >     expression_re.sub(resolve_variable(r'\1'), your_tag_argument)
>
> But if you wanted to use that logic in a tag defined by someone else,
> say, the url tag...
>
> Regards,
> -scott

I'd have to take a look at how that tag was implemented, but I'd
likely start out with something horrific, like the attached patch :D

Jonathan.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Attachment: template-expressions.diff
Description: Binary data

Reply via email to