Can you not simply pass foo:
{% make_button 'click me' foo %}
... resolve it, and then use either its .get_absolute_url() or
something other url, depending on what foo is? The inclusion tag's
python code is far more equipped to deal with logic decisions, special
cases, etc. than the template is.
On May 24, 4:49 pm, christian verkerk <[email protected]>
wrote:
> i made an inclusion tag for making an image button of varying widths,
> which i call through:
>
> {% make_button 'click me' item.get_absolute_url %}
>
> i then resolve the second param in context for the button link,
> however i would like to be able to do something along the lines of:
>
> {% make_button 'click me' '/specific/url/with/{{foo}}' %}
>
> in specific cases. resolving that whole second string into context to
> get something like '/specific/url/with/bar/'
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group
> athttp://groups.google.com/group/django-users?hl=en.
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected].
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.