Skip to content

Use modern URL scheme for localhost static #1775

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 20, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions readthedocs/urls.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from django.conf.urls import url, patterns, include
from django.contrib import admin
from django.conf import settings
from django.conf.urls.static import static
from django.views.generic.base import TemplateView

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