Z
Z
zkweb2015-09-26 21:18:42
Django
zkweb, 2015-09-26 21:18:42

How to solve error with Reverse for 'app_list' with arguments?

added to admin.py :

def get_admin_urls(urls):
    def get_urls():
        my_urls = patterns('',
            (r'^service/expired_contracts/$', admin.site.admin_view(expired_contracts))
        )
        return my_urls + urls
    return get_urls

admin_urls = get_admin_urls(admin.site.get_urls())
admin.site.get_urls = admin_urls

i.e. in order to be able to call view.py in the admin panel, I needed to be able to view a certain report in the admin panel, which will be available at: /admin/service/expired_contracts
Everything works, but if you connect the change_list.html template, then I get the error
NoReverseMatch at /admin/service/expired_contracts/
Reverse for 'app_list' with arguments '()' and keyword arguments '{u'app_label': ''}' not found. 1 pattern(s) tried: [u'admin/(?Pauth|questionnaire)/$']

Help, what and where to fix? I'm still quite new to Django)
That is, I'm trying to integrate the view.py file into admin.py

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
aka0, 2015-10-01
@aka0

www.stackoverflow.com/a/28777461/4169267

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question