Re: ifequals in templates

2008-12-08 Thread Vicky
Yea that was the mistake :) it wrks fine nw

On Dec 8, 3:16 pm, Daniel Roseman <[EMAIL PROTECTED]>
wrote:
> On Dec 8, 9:31 am, Vicky <[EMAIL PROTECTED]> wrote:
>
>
>
> > I tried to use the code
> > below:
> >                                                {% ifequal oftype
> > 'first_name' %}
> >                                                         {% for item in 
> > datas.first_name %}
> >                                                                  {{ 
> > item }} 
> >                                                         {% endfor %}
> >                                                 {% endifequal %}
>
> >                                                 {% ifequal oftype 
> > 'last_name' %}
> >                                                         {% for item in 
> > datas.last_name %}
> >                                                                  {{ 
> > item }} 
> >                                                         {% endfor %}
> >                                                 {% endifequal %}
>
> > But it didnt even execute either of the blocks. can anyone help me
> > with this?
>
> Are you sure oftype is equal to either of these values? Try putting
> {{ oftype }} before the loop to see what it actually contains.
> --
> DR.
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: ifequals in templates

2008-12-08 Thread Daniel Roseman
On Dec 8, 9:31 am, Vicky <[EMAIL PROTECTED]> wrote:
> I tried to use the code
> below:
>                                                {% ifequal oftype
> 'first_name' %}
>                                                         {% for item in 
> datas.first_name %}
>                                                                  {{ 
> item }} 
>                                                         {% endfor %}
>                                                 {% endifequal %}
>
>                                                 {% ifequal oftype 'last_name' 
> %}
>                                                         {% for item in 
> datas.last_name %}
>                                                                  {{ 
> item }} 
>                                                         {% endfor %}
>                                                 {% endifequal %}
>
> But it didnt even execute either of the blocks. can anyone help me
> with this?

Are you sure oftype is equal to either of these values? Try putting
{{ oftype }} before the loop to see what it actually contains.
--
DR.
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



ifequals in templates

2008-12-08 Thread Vicky

I tried to use the code
below:
   {% ifequal oftype
'first_name' %}
{% for item in 
datas.first_name %}
 {{ item 
}} 
{% endfor %}
{% endifequal %}

{% ifequal oftype 'last_name' %}
{% for item in 
datas.last_name %}
 {{ item 
}} 
{% endfor %}
{% endifequal %}

But it didnt even execute either of the blocks. can anyone help me
with this?
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---