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
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
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
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
> {%
4 matches
Mail list logo