Skip to content
Browse files

Merge pull request #39 from tubaman/serve_dev_media

serve user-uploaded media with the dev server
  • Loading branch information...
2 parents a2ce137 + 53c6b58 commit 04c078cb3cbc579f75f39f386e6d08dbe277b3ab @lukeman lukeman committed
View
3 pinax/projects/account_project/urls.py
@@ -1,6 +1,7 @@
from django.conf import settings
from django.conf.urls.defaults import *
from django.views.generic.simple import direct_to_template
+from django.conf.urls.static import static
from django.contrib import admin
admin.autodiscover()
@@ -26,4 +27,4 @@
if settings.SERVE_MEDIA:
urlpatterns += patterns("",
url(r"", include("staticfiles.urls")),
- )
+ ) + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
View
3 pinax/projects/basic_project/urls.py
@@ -1,6 +1,7 @@
from django.conf import settings
from django.conf.urls.defaults import *
from django.views.generic.simple import direct_to_template
+from django.conf.urls.static import static
from django.contrib import admin
admin.autodiscover()
@@ -29,4 +30,4 @@
if settings.SERVE_MEDIA:
urlpatterns += patterns("",
url(r"", include("staticfiles.urls")),
- )
+ ) + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
View
3 pinax/projects/zero_project/urls.py
@@ -1,6 +1,7 @@
from django.conf import settings
from django.conf.urls.defaults import *
from django.views.generic.simple import direct_to_template
+from django.conf.urls.static import static
from django.contrib import admin
admin.autodiscover()
@@ -20,4 +21,4 @@
if settings.SERVE_MEDIA:
urlpatterns += patterns("",
url(r"", include("staticfiles.urls")),
- )
+ ) + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)

0 comments on commit 04c078c

Please sign in to comment.
Something went wrong with that request. Please try again.