mirror of
https://github.com/Hopiu/django-markdownx.git
synced 2026-03-16 21:40:24 +00:00
updates URLs to Django 4 pattern
This commit is contained in:
parent
6b9a801a5b
commit
807763a7f4
2 changed files with 11 additions and 6 deletions
|
|
@ -1,8 +1,11 @@
|
|||
from django.conf.urls import include, url
|
||||
try:
|
||||
from django.conf.urls import include, url
|
||||
except ImportError:
|
||||
from django.urls import include, re_path as url
|
||||
|
||||
from .views import TestView
|
||||
|
||||
urlpatterns = [
|
||||
url(r'^testview/$', TestView.as_view()),
|
||||
url(r'^markdownx/', include('markdownx.urls')),
|
||||
url(r'^markdownx/$', include('markdownx.urls')),
|
||||
]
|
||||
|
|
|
|||
|
|
@ -3,8 +3,10 @@
|
|||
|
||||
See URLs in :doc:`../../example` to learn more.
|
||||
"""
|
||||
|
||||
from django.urls import path
|
||||
try:
|
||||
from django.conf.urls import url
|
||||
except ImportError:
|
||||
from django.urls import re_path as url
|
||||
|
||||
from .views import (
|
||||
ImageUploadView,
|
||||
|
|
@ -13,6 +15,6 @@ from .views import (
|
|||
|
||||
|
||||
urlpatterns = [
|
||||
path('upload', ImageUploadView.as_view(), name='markdownx_upload'),
|
||||
path('markdownify', MarkdownifyView.as_view(), name='markdownx_markdownify'),
|
||||
url('^upload/', ImageUploadView.as_view(), name='markdownx_upload'),
|
||||
url('^markdownify/', MarkdownifyView.as_view(), name='markdownx_markdownify'),
|
||||
]
|
||||
|
|
|
|||
Loading…
Reference in a new issue