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 %}
>
>
>
>
>
>
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
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
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
> 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
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
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
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
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
9 matches
Mail list logo