Re: how to create formset field but not used loop in template

2013-03-04 Thread Witold Greń
It works! Thank you ;) W dniu piątek, 1 marca 2013 12:43:22 UTC+1 użytkownik Witold Greń napisał: > > When i create formset in template i must used loop "for": > > {{ formset_create_company.management_form }} > > {% for form in formset_create_company.forms %} > > > > > >

Re: how to create formset field but not used loop in template

2013-03-01 Thread C. Kirby
I do sometimes reference formset forms individually without the loop. Allows me to better create my layout. As for your question Witold, list items in a template can take an index to select a single item. This will only work if you know how many forms are in your formset: {{formset_create_compa

Re: how to create formset field but not used loop in template

2013-03-01 Thread Daniel Roseman
On Friday, 1 March 2013 11:43:22 UTC, Witold Greń wrote: > > When i create formset in template i must used loop "for": > > > > How to create field but not used loop "for"? eg. {{ > formset_create_company.form.no_house }}?? > Can you explain why you don't want to use for? Seems perfectly sensib

how to create formset field but not used loop in template

2013-03-01 Thread Witold Greń
When i create formset in template i must used loop "for": {{ formset_create_company.management_form }} {% for form in formset_create_company.forms %} {{ form.postal_code.label }} {{ form.postal_code }} {{ form.city.label

Re: Sending two list...using for loop in template

2007-12-04 Thread Tim Chase
> return render_to_response('webpage.htm', {'manu': s, 'thelist': > mylist}) > > / > > Here is what I have in my template > > {% for a in manu %} > {{ thelist.{{forloop.counter0}} }} > {% endfor %} Given that you're not using "a" in your loop, is there

Sending two list...using for loop in template

2007-12-03 Thread Greg
Hello, I'm sending two list to my template. I'm looping through one of my list in a for loop. Within that for loop I want to display that contents of my other list. Here is what I have so far: Here is my return statement in my view that calls the template. return

Re: Loop in template

2006-08-02 Thread spako
thanks for the short answer :) saved me around hunting for something. --~--~-~--~~~---~--~~ 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 unsub

Re: Loop in template

2006-08-01 Thread Malcolm Tredinnick
On Tue, 2006-08-01 at 16:22 +, spako wrote: > i was wondering if there is a way to use the for loop to loop through a > sequence of numbers? > > i.e. in python you would: > > for i in range(10): > > > how would you do this in the template? You can't. If you want a list of numbers

Loop in template

2006-08-01 Thread spako
i was wondering if there is a way to use the for loop to loop through a sequence of numbers? i.e. in python you would: for i in range(10): how would you do this in the template? i'd like to use this for some paging i'm building. i want to keep all the html in the templates, as there i