Hi,

since #9666 (SSI-tag variable resolving) got accepted by Jacob lately
I would like to restart discussion about the same functionality for
the url template tag (as was already proposed in #7917).

Pro arguments:
- The url tag is one of the few remaining tags that doesn't accept a
variable as it's "main" argument and is therefore inconsistent
behaviour.
- Allowing variables would enable the use in inclusion tags (e.g. a
pagination inclusion tag which takes a view name as argument - leading
to cleaner urls without get parameters with is beneficial for caching
etc.) .
- Generally reducing DRY in templates with similar content but
different links.

Contra arguments:
- Possible name clashes between views and template variables.
- May possibly lead to difficult to track down behaviour.

Personally I think the benefits outweigh the risks especially if the
changes are phased in over a period of time.
For example:
1.2: Add the try-resolving-first-then-fall-back-to-literal behaviour.
1.3: Deprecate non-quoted literal view names and issue a warning if
they are used
1.4: Switch to "normal" variable/filter parsing as found in many other
tags.

What do you think?

Ulrich

P.S.: If needed I can provide a patch for the proposed behaviour. It
would be largely similar to the updated patch of #9666.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-developers@googlegroups.com
To unsubscribe from this group, send email to 
django-developers+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to