Sunday, May 1, 2011

Re: probably a simple query: looping for an integer number within an html page

Can you provide more details?
What error are you getting? Or you get no error and no output?
Are you sure you are inserting "somelist" in the context?
Is somelist a list of integers or is it an object with an attribute
int_item that is a list of ints?

Br,

On Apr 30, 10:42 pm, Jason <1jason.whatf...@gmail.com> wrote:
> Hi there,
>
> I am writing a list with values to a web page. Within that page a list item
> (somelist.int_item) takes an integer value. What I'm trying (and failing) to
> do is to write a for loop that repeats for the number in the integer item.
>
> So far I've got
>
> {% for number in somelist.int_item %}
>    <p> Item number {{ number }} </p>
> {% endfor %}
>
> At the moment this isn't running at all...
>
> Any ideas?

--
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

No comments:

Post a Comment