>
> What kind of support do you except for third-party template tags? Suppose, 
> that
> `cycle` tag is not builtin. Would it be acceptable to write sth like that:
>
>     dtl cycle '1' '2' as rows
>
> It could be quite easily implemented as a Jinja2 extensions. Of course, I 
> guess
> that you'd prefer this style:
>
>     cycle '1' '2' as rows
>

Good question. In my opinion, making the tag invocation look the same as it 
does in DTL should not be an important goal. These are different languages, 
after all, with different syntaxes and different calling conventions. For 
example, many things that need to be tags in DTL are just functions in 
Jinja. (django-jinja took this approach by implementing the built-in 'url' 
as a function rather than a tag.)

Another relevant issue is that there could be name ambiguities. In DTL you 
specify a module with the load tag, which allows you to have multiple apps 
that use the same template tag name. Without the load tag you need some way 
to specify which 'cycle' you're referring to. (This is not just an issue 
with wrapping DTL tags, it's also going to be an issue if multiple apps try 
to register global Jinja functions with the same name.)

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/57769035-c8c3-45a0-a7c3-4fc757b79497%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to