1
  1. I have installed grappelli via pip install (and subsequently updated it, to be sure).

  2. I put it before django.contrib.admin in INSTALLED_APPS:

    INSTALLED_APPS = (
        ... 
        'grappelli',
        'django.contrib.admin',
    
  3. My urls.py looks like this:

    url(r'^grappelli/', include('grappelli.urls')),
    url(r'^admin/', include(admin.site.urls)),
    
  4. 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?

Maxime Lorant
  • 34,607
  • 19
  • 87
  • 97
Joseph Tura
  • 6,290
  • 8
  • 47
  • 73

3 Answers3

3

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.

tjb
  • 11,480
  • 9
  • 70
  • 91
1

You have to run syncdb command

yedpodtrzitko
  • 9,035
  • 2
  • 40
  • 42
0

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!

gacon
  • 2,075
  • 4
  • 21
  • 32