On 2/11/06, Luke Skibinski Holt <[EMAIL PROTECTED]> wrote: > > > Would it be possible for me to use this function within a template > > {% if user.is_member_of:"blah" %} > > I think calling functions with parameters from within a template was > deliberately not included for security and simplicity reasons.
The biggest reason for this isn't security or simplicity - it is to prevent view logic from slipping into the template. Django templates are deliberately 'simple' to prevent template writers from embedding view logic in the template. If a complex logical operation required is required, it must be a representation of some larger abstract concept. Evaluate the condition in the view, and pass it in to the template as a context variable. That way, if the logical condition describing the abstract concept ever changes, you don't have to modify the template - just the view logic that evaluates the context variable. Russ Magee %-)