Reputation: 1851
I'm trying to install djanjo-grappeli package.
My setting :
INSTALLED_APPS = (
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'grappelli',
'django.contrib.admin',
#'south',
'app_salon',
'app_agenda',
)
STATICFILES_FINDERS = (
'django.contrib.staticfiles.finders.AppDirectoriesFinder',
'django.contrib.staticfiles.finders.FileSystemFinder',
)
TEMPLATE_CONTEXT_PROCESSORS = (
'django.core.context_processors.request',
'django.contrib.auth.context_processors.auth',
)
My urls.py
urlpatterns = patterns('',
url(r'^grappelli/', include('grappelli.urls')), # grappelli URLS
url(r'^admin/', include(admin.site.urls)),
)
But it returns :
Page not found (404) Request Method: GET Request URL: localhost:8000/grappelli Using the URLconf defined in salon.urls, Django tried these URL patterns, in this order: ^grappelli/ ^admin/ The current URL, grappelli, didn't match any of these.
Upvotes: 1
Views: 528
Reputation: 541
Change your INSTALLED_APPS
like so:
INSTALLED_APPS = (
'grappelli',
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
#'south',
'app_salon',
'app_agenda',
)
And make sure you have the following settings:
STATICFILES_FINDERS = (
'django.contrib.staticfiles.finders.AppDirectoriesFinder',
'django.contrib.staticfiles.finders.FileSystemFinder',
)
TEMPLATE_CONTEXT_PROCESSORS = (
...
"django.core.context_processors.request",
)
Then collect media files:
$ python manage.py collectstatic
Source: https://django-grappelli.readthedocs.org/en/latest/quickstart.html
Upvotes: 2