mirror of
https://github.com/jazzband/django-constance.git
synced 2026-03-16 22:40:24 +00:00
Fixed admin statics in example project
This commit is contained in:
parent
eb03ee908a
commit
cf8f4da93d
2 changed files with 15 additions and 1 deletions
|
|
@ -55,6 +55,8 @@ MEDIA_ROOT = ''
|
|||
# Examples: "http://media.lawrence.com", "http://example.com/media/"
|
||||
MEDIA_URL = ''
|
||||
|
||||
STATIC_URL = '/static/'
|
||||
|
||||
# URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
|
||||
# trailing slash.
|
||||
# Examples: "http://foo.com/media/", "/media/".
|
||||
|
|
|
|||
|
|
@ -1,4 +1,6 @@
|
|||
from django.conf.urls.defaults import *
|
||||
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
|
||||
from django.conf import settings
|
||||
|
||||
# Uncomment the next two lines to enable the admin:
|
||||
from django.contrib import admin
|
||||
|
|
@ -8,10 +10,20 @@ urlpatterns = patterns('',
|
|||
# Example:
|
||||
# (r'^cheeseshop/', include('cheeseshop.foo.urls')),
|
||||
|
||||
# Uncomment the admin/doc line below and add 'django.contrib.admindocs'
|
||||
# Uncomment the admin/doc line below and add 'django.contrib.admindocs'
|
||||
# to INSTALLED_APPS to enable admin documentation:
|
||||
# (r'^admin/doc/', include('django.contrib.admindocs.urls')),
|
||||
|
||||
# Uncomment the next line to enable the admin:
|
||||
(r'^admin/', include(admin.site.urls)),
|
||||
)
|
||||
|
||||
if settings.DEBUG:
|
||||
urlpatterns += staticfiles_urlpatterns()
|
||||
urlpatterns += patterns(
|
||||
'',
|
||||
url(r'^media/(?P<path>.*)$',
|
||||
'django.views.static.serve', {
|
||||
'document_root': settings.MEDIA_ROOT,
|
||||
}),
|
||||
)
|
||||
|
|
|
|||
Loading…
Reference in a new issue