neutronX / django-markdownx

Comprehensive Markdown plugin built for Django
https://neutronx.github.io/django-markdownx/
Other
863 stars 153 forks source link

A recent Upload and markdownify path errors #248

Closed ericel closed 1 year ago

ericel commented 1 year ago

This is what the present code from pip manager markdown.urls looks like:

from django.conf.urls import url
from .views import (
    ImageUploadView,
    MarkdownifyView,
)
urlpatterns = [
    url(r'^upload/$', ImageUploadView.as_view(), name='markdownx_upload'),
    url(r'^markdownify/$', MarkdownifyView.as_view(), name='markdownx_markdownify'),
]

This complains of no import of url from django.conf.urls. Which makes sense. Shouldn't this be the right code?:

from django.urls import path
from .views import (
    ImageUploadView,
    MarkdownifyView,
)
urlpatterns = [
    path('upload/', ImageUploadView.as_view(), name='markdownx_upload'),
    path('markdownify/', MarkdownifyView.as_view(), name='markdownx_markdownify'),
]