To solve this, Django provides a
> takes_context option for inclusion tags. If you specify takes_context
> in creating a template tag, the tag will have no required arguments,
> and the underlying Python function will have one argument -- the
> template context as of when
Why 'inclusion_tag' from 'django.template' does not accept the
argument 'name', as the method of 'tag' does?
For example, I need two inclusion_tag's with the same functionality
but with different templates. It would be nice to do something like
this:
register.inclusion_tag('first.html', name='tag
2 matches
Mail list logo