{django-tables} Caught NameError while rendering: global name 'name' is not defined.
Hello,
Please why am I get the following error:
Caught NameError while rendering: global name 'name' is not defined.
Initially I did not receive this sort of error, it just surfaced all
off a sudden. I restored my app to the state where everything worked
and I'm still getting the same error.
Full stack trace:
Caught NameError while rendering: global name 'name' is not defined
Request Method: GET
Request URL: http://site/reports
Django Version: 1.3
Exception Type: TemplateSyntaxError
Exception Value:
Caught NameError while rendering: global name 'name' is not defined
Exception Location: build\bdist.win32\egg\django_tables\models.py in
_default_render, line 73
Python Executable: C:\path\apache\apache2.2.10\bin\httpd.exe
Python Version: 2.7.1
In my template file:
{% load humanize %}
{% load tables %}
{% load pagination_tags %}
{% autopaginate rows 2 %}
{% for row in table.rows %}
<tr class="{% cycle 'odd' 'even' %}">
{% for value in row %}
<td class="table-data">{{ value }}<td>
{% endfor %}
</tr>
{% endfor %}
When i remove the above code from my template the error goes away but
table rows are not displayed.
Any suggestions please.
Thanks
--
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.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home