Question

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.

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top