> Thanks for the response. But to be fair to you I must disclose that I > anticipated that someone would present this as an answer. I would have > added this discussion into the original but it was already a bit > long... :-)
Pesky kids these days, with your music and your anticipation... > Now when I say expressions, I believe that at least 80% (if not more) > of my objections could be addressed by allowing the following sort > construct in template tags only: > > {% mytag "${some.context.variable}-arbitrary-${other.variable}-text" > "Choose ${ parrot.name }!" %} > > There... no dirty logic, no arithmetic, nothing really objectionable > as far as I can see with regards to the stated philosophy, but it > opens up a whole world of possibilities for the template designer that > are currently rather difficult and unnecessarily time-consuming to > accomplish. One could even place this in the split_contents function > to get halfway there, but I still believe it is most useful when > implemented by the template parsing system. I mean, even Velocity > allows this, and they're a good deal more dogmatic about it than the > Django folks seem to be. 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) > Again, thank you for the response, and regards, > -scott anderson Thanks for the interesting discussion, I only wish I had time to participate in it properly. 5pm approaches :) 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 -~----------~----~----~----~------~----~------~--~---