On Apr 4, 9:32 am, Matias Surdi <[EMAIL PROTECTED]> wrote:
> Hi,
> Is it possible to pass keyword arguments to a custom inclusion tag?

I'm still back on .96, but as far as I know tags only support
positional arguments. I made some helpers that kind of allow a
combination of keyword and positional arguments to a custom tag for an
itch I had a while back :http://dpaste.com/43119/  . That might help
you if you really need keyword args.   It seems like for what you
describe it might be easier to just stick with the inclusion tag and
positional arguments.

>
> example:
>
> @register.inclusion_tag('shared/form.html')
> def form(form, action="",method="POST"):
>      return {"form": form,
>              "action": action,
>              "method": method}
>
> I'd like to call this from a template, using something like this:
>
> {{ form myform,method="POST"}}
>




> What is the correct way to do this?
>
> Thanks.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to