Files
Pinry/pinry/urls.py
winkidney f85a1e7301 Fix: Upgrade django to 1.11 LTS
New version of django fix the RuntimeError while saving wepb file.

The patch will not be applied to Django 1.8

Ref: https://www.djangoproject.com/download/#supported-versions

Ref: https://github.com/django/django/pull/10331
2018-08-26 21:30:07 -07:00

22 lines
593 B
Python

from django.conf import settings
from django.conf.urls import include, url
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from django.contrib import admin
from django.views.static import serve
admin.autodiscover()
urlpatterns = [
url(r'^admin/', include(admin.site.urls)),
url(r'', include('core.urls', namespace='core')),
url(r'', include('users.urls', namespace='users')),
]
if settings.DEBUG:
urlpatterns += staticfiles_urlpatterns()
urlpatterns += [
url(r'^media/(?P<path>.*)$', serve, {'document_root': settings.MEDIA_ROOT, }),
]