Skip to content

Commit

Permalink
only serve media files in development
Browse files Browse the repository at this point in the history
  • Loading branch information
jsayles committed Aug 30, 2016
1 parent 4070e1b commit 53bce87
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions nadine/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
path = lambda *a: os.path.join(ROOT, *a)

# TEMPLATE_DIRS = (path('../templates/'), )
MEDIA_URL = '/media/'
MEDIA_ROOT = path('../media/')

BACKUP_ROOT = path('../backups/')
Expand Down
2 changes: 2 additions & 0 deletions urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from django.conf.urls import include, url
from django.contrib import admin
from django.conf import settings
from django.conf.urls.static import static
from django.http import HttpResponse, HttpResponseRedirect
from django.shortcuts import redirect

Expand Down Expand Up @@ -56,6 +57,7 @@
if settings.DEBUG:
import debug_toolbar
urlpatterns.append(url(r'^__debug__/', include(debug_toolbar.urls)))
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)


def get_manifest():
Expand Down

0 comments on commit 53bce87

Please sign in to comment.