Django: Error accessing admin/auth/user history us

2019-09-05 22:13发布

I'm trying to access admin/App/ history: for users and groups and I get the following error.

I'm using django-simple-history module.

In admin.py my code is:

from django.contrib.auth.models import User, Group
from simple_history import register

register(User,inherit=True)
register(Group,inherit=True)

In my SQL workbench the tables for history are created and the store data successfully. But in /admin/auth/user/ site I get the following error.

For example I'm trying to access a user's history and see this:

NoReverseMatch at /admin/auth/user/4/history/
Reverse for 'app_list' with arguments '()' and keyword arguments '{u'app_label': ''}' not found. 1 pattern(s) tried: [u'admin/(?P<app_label>eReg|auth)/$']

Error during template rendering

In template C:\Users\zinwnas\PycharmProjects\project_myTIF_test\static\templates\admin\object_history.html, error at line 7
Reverse for 'app_list' with arguments '()' and keyword arguments '{u'app_label': ''}' not found. 1 pattern(s) tried: [u'admin/(?P<app_label>eReg|auth)/$']
1   {% extends "admin/base_site.html" %}
2   {% load i18n admin_urls %}
3   
4   {% block breadcrumbs %}
5   <div class="breadcrumbs">
6   <a href="{% url 'admin:index' %}">{% trans 'Home' %}</a>
7   
      &rsaquo; <a href="
      {% url 'admin:app_list' app_label=app_label %}
      ">{{ app_label|capfirst|escape }}</a>


8   &rsaquo; <a href="{% url opts|admin_urlname:'changelist' %}">{{ module_name }}</a>
9   &rsaquo; <a href="{% url opts|admin_urlname:'change' object.pk|admin_urlquote %}">{{ object|truncatewords:"18" }}</a>
10  &rsaquo; {% trans 'History' %}
11  </div>
12  {% endblock %}
13  
14  {% block content %}
15  <div id="content-main">
16  <div class="module">
17  

0条回答
登录 后发表回答