On Tue, May 5, 2009 at 3:18 PM, Gabriel . <gabriel....@gmail.com> wrote:
> > I have a model with a method, like: > > class Model ...... > # class body > > def is_maintainer(user): > #method body > > Is there any way to invoke this method from a template ? > > {% if model.is_maintainer request.user %} # this doesn't work > > or should I write my own tag ? > > Kind Regards > > > > Yes, it's necessary to write your own tag, as you can't call methods that take parameters from the template language. Alex -- "I disapprove of what you say, but I will defend to the death your right to say it." --Voltaire "The people's good is the highest law."--Cicero --~--~---------~--~----~------------~-------~--~----~ 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 django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---