adding weltenfall internal serve code to the urls
This commit is contained in:
parent
8abcc73df9
commit
b6ec851981
@ -11,7 +11,7 @@ https://docs.djangoproject.com/en/1.6/ref/settings/
|
||||
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
|
||||
import os
|
||||
BASE_DIR = os.path.dirname(os.path.dirname(__file__))
|
||||
|
||||
SERVE_INTERNAL = True
|
||||
|
||||
# Quick-start development settings - unsuitable for production
|
||||
# See https://docs.djangoproject.com/en/1.6/howto/deployment/checklist/
|
||||
|
@ -11,9 +11,10 @@ urlpatterns = patterns('',
|
||||
url(r'^crafting/', 'dj.scon.views.crafting', name='scon_crafting'),
|
||||
)
|
||||
|
||||
if settings.DEBUG :
|
||||
if settings.DEBUG or getattr(settings, 'SERVE_INTERNAL', False):
|
||||
urlpatterns += patterns('',
|
||||
(r'^media/(?P<path>.*)$', 'django.views.static.serve',
|
||||
{'document_root': settings.MEDIA_ROOT, 'show_indexes': True}),
|
||||
|
||||
url(r'^static/(?P<path>.*)$', 'django.contrib.staticfiles.views.serve'),
|
||||
url(r'^media/(?P<path>.*)$', 'django.views.static.serve', {
|
||||
'document_root': settings.MEDIA_ROOT,
|
||||
}),
|
||||
)
|
Loading…
Reference in New Issue
Block a user