Re: Is valid {% ifequal model.name "Mymodelname" %}??

2009-09-04 Thread Bill Freeman
I'm going to take a flier and guess that you want this to be conditional on the name of the class of an instance passed in the context. That is, you have a model class Foo, maybe another named Bar that you have an instance of the class, e.g.; x = Foo.objects.get(pk=1), and that you're passing it

Re: Is valid {% ifequal model.name "Mymodelname" %}??

2009-09-02 Thread Andrew McGregor
On Wed, Sep 2, 2009 at 4:44 PM, Sandra Django wrote: > Hi friends, Can I do a condition depending on my model name? For example, I > did that: > {% ifequal model.name "Mymodelname" %} > do something > {% endifequal %} > > But don't work. Someone could help me? As

Is valid {% ifequal model.name "Mymodelname" %}??

2009-09-02 Thread Sandra Django
Hi friends, Can I do a condition depending on my model name? For example, I did that: {% ifequal model.name "Mymodelname" %} do something {% endifequal %} But don't work. Someone could help me? --~--~-~--~~~---~--~~ You received this message because you are

Re: Is valid {% ifequal model.name "Mymodelname" %}??

2009-09-02 Thread JF Simon
Be more specific, is model in the context ? is name a property of model ? On 2 sep, 17:44, Sandra Django wrote: > Hi friends, Can I do a condition depending on my model name? For example, I > did that: > {% ifequal model.name "Mymodelname" %} >      do something > {%