Skip to content

Commit

Permalink
增加对django 2.x 的支持
Browse files Browse the repository at this point in the history
  • Loading branch information
pylixm committed Jun 29, 2018
1 parent f81925a commit 6904ff0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
13 changes: 10 additions & 3 deletions mdeditor/urls.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
# -*- coding:utf-8 -*-
from django.conf.urls import url
import django

from .views import UploadView

if django.VERSION[0] > 1:
from django.urls import re_path as url_func
else:
from django.conf.urls import url as url_func


urlpatterns = [
url(r'^uploads/$', UploadView.as_view(), name='uploads'),
]
url_func(r'^uploads/$', UploadView.as_view(), name='uploads'),
]
4 changes: 1 addition & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@
url='',
author='pylixm',
author_email='[email protected]',
install_requires=[
'django==1.11.10',
],
classifiers=[
'Environment :: Web Environment',
'Framework :: Django',
Expand All @@ -29,6 +26,7 @@
'Framework :: Django :: 1.9',
'Framework :: Django :: 1.10',
'Framework :: Django :: 1.11',
'Framework :: Django :: 2.0',
'Intended Audience :: Developers',
'License :: OSI Approved :: GNU General Public License v3 (GPLv3)',
'Operating System :: OS Independent',
Expand Down

0 comments on commit 6904ff0

Please sign in to comment.