We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents ad4e034 + 7e06ea0 commit 3127629Copy full SHA for 3127629
readthedocs/urls.py
@@ -1,6 +1,7 @@
1
from django.conf.urls import url, patterns, include
2
from django.contrib import admin
3
from django.conf import settings
4
+from django.conf.urls.static import static
5
from django.views.generic.base import TemplateView
6
7
from tastypie.api import Api
@@ -75,7 +76,4 @@
75
76
'', # base view, flake8 complains if it is on the previous line.
77
url('style-catalog/$',
78
TemplateView.as_view(template_name='style_catalog.html')),
- url(regex='^%s/(?P<path>.*)$' % settings.MEDIA_URL.strip('/'),
79
- view='django.views.static.serve',
80
- kwargs={'document_root': settings.MEDIA_ROOT}),
81
- )
+ ) + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
0 commit comments