Have you tried {{item1|pprint}} ?
Or to check the raw page, not the one displayed by the brother ?
I got bitten more than once by brother not displaying variable whose
value looked like <Object date>

2016-06-22 20:31 GMT+02:00  <[email protected]>:
> Hello everyone,
>
> I am trying to do the following:
>
> Grab Year/Month values from a template page via dropdown select list and
> send them via ajax post (this part is working)
>
> Process the submitted values and return new variables to the same template
> page, it works if I hard code the Month/Year but it won't display anything
> when I change values and re-submit them.
>
> In the console I can print selected Month/Year and values for the 3
> variables without any issues, but the template page is not displaying
> anything
>
>
> Thanks!
>
>
> here is my code:
>
> page.html
>
>   {% for item1, item2, item3 in list_results %}
>        <td>{{ item1 }}</td>
>         <td>{{ item2 }}</td>
>         <td>{{ item3 }}</td>
>
> </tr>
> {% endfor %}
>
> views.py
>
> def data_web(request):
>
>     if request.method == 'POST':
>         year = request.POST.get('the_year')
>         month = request.POST.get('the_month')
>         year = int(year)
>         month = int(month)
>
>         var1, var2, var3 = count_files(year, month)
>         list_results = zip(var1, var2, var3)
>
>         print "Year", year, "month", month, list_results
>
>
>         return render(request, 'page.html', {'list_results': list_results})
>     else:
>         return render(request, 'page.html')
>
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/e4a5ea8f-3b44-44d8-8946-7e6d7f131463%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



-- 

Cordialement, Coues Ludovic
+336 148 743 42

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAEuG%2BTYs%2BR%3DJw%2ByFDQGTw%3DC47qpbzFBncJO-TazLfOgLo0K97Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to