Thanks.
On Jan 2, 8:47 pm, Jeff Anderson <[EMAIL PROTECTED]> wrote:
> From the template docs:http://www.djangoproject.com/documentation/templates/
>
> {% for key, value in data.items %}
> {{ key }}: {{ value }}
> {% endfor %}
>
> Note that this is for the svn version of django.
>
> brandonl w
>From the template docs:
http://www.djangoproject.com/documentation/templates/
{% for key, value in data.items %}
{{ key }}: {{ value }}
{% endfor %}
Note that this is for the svn version of django.
brandonl wrote:
> I have a simple view:
>
> def index(request):
> this_dict = { 'one':'
This might help...
from: http://www.djangoproject.com/documentation/templates/#for
{% for key, value in this_dict.items %}
{{ key }}: {{ value }}
{% endfor %}
-Bill
On Jan 2, 2008, at 8:40 PM, brandonl wrote:
I have a simple view:
def index(request):
this_dict = { 'one':'','tw
I have a simple view:
def index(request):
this_dict = { 'one':'','two':'', 'three':''}
c = Context({"this_dict":this_dict})
return HttpResponse(t.render(c))
my template is like so:
{% for i in this_dict %}
key: {{i}}
value:{{this_dict.i}}
{% endfor %}
4 matches
Mail list logo