Skip to content

Commit 3127629

Browse files
committed
Merge pull request #1775 from techtonik/master
Use modern URL scheme for localhost static
2 parents ad4e034 + 7e06ea0 commit 3127629

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

readthedocs/urls.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
from django.conf.urls import url, patterns, include
22
from django.contrib import admin
33
from django.conf import settings
4+
from django.conf.urls.static import static
45
from django.views.generic.base import TemplateView
56

67
from tastypie.api import Api
@@ -75,7 +76,4 @@
7576
'', # base view, flake8 complains if it is on the previous line.
7677
url('style-catalog/$',
7778
TemplateView.as_view(template_name='style_catalog.html')),
78-
url(regex='^%s/(?P<path>.*)$' % settings.MEDIA_URL.strip('/'),
79-
view='django.views.static.serve',
80-
kwargs={'document_root': settings.MEDIA_ROOT}),
81-
)
79+
) + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)

0 commit comments

Comments
 (0)