0

I'm getting an error of when I'm trying to configure my admin grappelli. Whenever my index is commented out, the admin pages work fine. But When uncommented it gives me an error of ImproperlyConfigured at /admin/. How should I be configuring the admin then?

from django.conf.urls.defaults import *
from django.views.static import *

# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()

urlpatterns = patterns('',
    (r'^admin/', include('apps.grappelli.urls')),
    (r'^admin/', include(admin.site.urls)),
    (r'^$', include('apps.index.views')),

    # Examples:
    #(r'^blog/', include('apps.blog.views')),

    # Uncomment the admin/doc line below to enable admin documentation:
    #(r'^admin/doc/', include('django.contrib.admindocs.urls')),

    # Uncomment the next line to enable the admin:

)

Thanks.

user805981
  • 9,979
  • 8
  • 44
  • 64
  • You've routed the same pattern twice (`^admin/.`) and the second one has no quotes around the include parameter. I'm not familiar with setting up patterns in Django but that is sticking out like a sore thumb. – m.brindley Feb 02 '13 at 20:16
  • It works fine if I comment out the apps.index.view line. It's kinda strange how it works... :/ – user805981 Feb 02 '13 at 20:19

1 Answers1

1

This is my urlconf I'm also using grampelli and works fine,

urlpatterns = patterns('',
    url(r'^admin/', include(admin.site.urls)),
    url(r'^grappelli/', include('grappelli.urls')),

I recomend you to use django-boilerplate to get rid of this little configuration Issues.