Note that there are some explanatory texts on larger screens.

plurals
  1. PONoReverseMatch at /admin/app/model/ - Admin change_list.html
    primarykey
    data
    text
    <p>I don't know why I get this error while trying to reach the admin <code>change_list</code> page of the <code>mymodel</code> model:</p> <pre><code>NoReverseMatch at /admin/myapp/mymodel/ Reverse for 'myapp_mymodel_change' with arguments '(u'',)' and keyword arguments '{}' not found. Error during template rendering In template /usr/local/lib/python2.7/dist-packages/django/contrib/admin/templates/admin/change_list.html, error at line 91 84 &lt;form id="changelist-form" action="" method="post"{% if cl.formset.is_multipart %} enctype="multipart/form-data"{% endif %}&gt;{% csrf_token %} 85 {% if cl.formset %} 86 &lt;div&gt;{{ cl.formset.management_form }}&lt;/div&gt; 87 {% endif %} 88 89 {% block result_list %} 90 {% if action_form and actions_on_top and cl.full_result_count %}{% admin_actions %}{% endif %} 91 {% result_list cl %} 92 {% if action_form and actions_on_bottom and cl.full_result_count %}{% admin_actions %}{% endif %} 93 {% endblock %} 94 {% block pagination %}{% pagination cl %}{% endblock %} 95 &lt;/form&gt; </code></pre> <p>The error does not occur on my local runserver(Python 2.7.5, Django 1.5.1), only when deployed on my remote server (Python 2.7.2+, Django 1.5.1). Interestingly enough, only one specific model is affected by this -- I can reach the <code>change_list</code> pages of all the other models without any problems whatsoever. The rest of the admin area works fine as well.</p> <p>The answers to similar questions regarding the <code>NoReverseMatch</code> error didn't help much because it happens in the admin, not my own code. Does anyone know where to start looking?</p> <p><strong>EDIT:</strong></p> <p>I had some customised <code>list_display</code> fields which I now commented out for testing. They seemed to be responsible for the <code>NoReverseMatch</code> error. Now I got another error instead: </p> <pre><code>AttributeError at /admin/myapp/mymodel/ 'NoneType' object has no attribute '_meta' </code></pre> <p>I then stripped away everything that isn't necessary. This is now my complete <code>admin.py</code>:</p> <pre><code>from django.contrib import admin from myproject.myapp.models import * class MymodelAdmin(admin.ModelAdmin): list_display = ['email', 'user', 'is_active', 'first_used'] date_hierarchy = 'first_used' ordering = ['-first_used'] list_filter = ['is_active', 'first_used', 'user'] admin.site.register(Mymodel, MymodelAdmin) </code></pre> <p>And on my local machine it still works perfectly.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload