Commit 0df51117 authored by Arthur Shevchenko's avatar Arthur Shevchenko
Browse files

Add initial Django 2.0 support.

parent 959cc441
import os
from django.conf import settings
from django.core.urlresolvers import reverse
from django.urls import reverse
# If true, when file objects are created, they will be automatically copied
# to the local file system for faster serving.
......
......@@ -7,7 +7,7 @@ from six import StringIO
from django.conf import settings
from django.core import files
from django.core.files.storage import FileSystemStorage
from django.core.urlresolvers import reverse
from django.urls import reverse
from database_files import models
from database_files import utils
......
try:
# Removed in Django 1.6
from django.conf.urls.defaults import patterns, url
except ImportError:
from django.conf.urls import patterns, url
from django.urls import re_path
urlpatterns = patterns('',
from database_files import views
urlpatterns = [
# url(r'^files/(?P<name>.+)$',
# 'database_files.views.serve',
# name='database_file'),
url(r'^files/(?P<name>.+)$',
'database_files.views.serve_mixed',
re_path(r'^files/(?P<name>.+)$',
views.serve_mixed,
name='database_file'),
)
]
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment