Reputation: 6360
I have installed grappelli via pip install (and subsequently updated it, to be sure).
I put it before django.contrib.admin in INSTALLED_APPS:
INSTALLED_APPS = (
...
'grappelli',
'django.contrib.admin',
My urls.py looks like this:
url(r'^grappelli/', include('grappelli.urls')),
url(r'^admin/', include(admin.site.urls)),
Still I am getting an error:
Using the URLconf defined in _myWebsite.urls, Django tried these URL patterns, in this order:
^grappelli/ ^lookup/related/$ [name='grp_related_lookup']
^grappelli/ ^lookup/m2m/$ [name='grp_m2m_lookup']
^grappelli/ ^lookup/autocomplete/$ [name='grp_autocomplete_lookup']
^admin/
^categories/$
The current URL, grappelli/, didn't match any of these.
What am I doing wrong?
Upvotes: 1
Views: 1135
Reputation: 2135
If you are using Django version 1.6 you may have to search "django.conf.urls.defaults" in grappelli library and replace it with "django.conf.urls". If you are using Django version less than 1.6 so my post is not your problem. Hope you soon fixed it!
Upvotes: 0
Reputation: 11728
Maybe you should try to rewrite your url patterns to match the way they do it in the default urls.py, for example:
urlpatterns = patterns('', #this first entry is very important
url(r'^grappelli/', include('grappelli.urls')),
url(r'^admin/', include(admin.site.urls)))
I know that if you use the patterns
function having that first empty string function parameter is very important...perhaps you missed it.
Upvotes: 3