I just imported 57,000 records into a MySql database and when I go in admin and click on the model corresponding to the records I get this mess below. Any ideas?
KeyError at /admin/donate/donor/
10
Error during template rendering
In template /Users/user/Development/project/project/templates/admin/donate/donor/change_list.html, error at line 98
{% block result_list %}
97 {% if action_form and actions_on_top and cl.full_result_count %}{% admin_actions %}{% endif %}
98 {% result_list cl %} ##THIS IS THROWING THE ERROR
99 {% if action_form and actions_on_bottom and cl.full_result_count %}{% admin_actions %}{% endif %}
100 {% endblock %}
On the traceback at the bottom I get this:
{True: ‘yes’, False: ‘no’, None: ‘unknown’}[field_val])
Local Vars: field_val 10
Turns out that a boolean field got data entered in it that wasent 1 or 0.
I changed them all to 0 and bam, worked. The Local Vars: field_val 10 was telling me that the invalid number ’10’ was throwing the error