I just wrote an snippet, in case someone is interested.
http://www.djangosnippets.org/snippets/1486/
--
Kind Regards
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, sen
On Tue, May 5, 2009 at 10:20 AM, Alex Gaynor wrote:
> Yes, it's necessary to write your own tag, as you can't call methods that
> take parameters from the template language.
>
> Alex
>
Thank you for the quick reply.
I'll start working on it.
--
Kind Regards
--~--~-~--~~
On Tue, May 5, 2009 at 3:18 PM, Gabriel . 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
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
--~--~-~-
4 matches
Mail list logo