Skip to content

Commit

Permalink
ADD: Support for Django 4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jseop-lim committed Dec 20, 2023
1 parent 9d18947 commit da7751a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
logging.basicConfig(level=logging.DEBUG)

from django.conf import settings
from django.conf.urls import url
from django.urls import re_path
from django.core.wsgi import get_wsgi_application
from django.utils.timezone import now as tznow

Expand Down Expand Up @@ -75,7 +75,7 @@ def get_context_data(self, **kwargs):


urlpatterns = [
url(r'^$', DemoPDFView.as_view())
re_path(r'^$', DemoPDFView.as_view())
]

application = get_wsgi_application()
Expand Down
2 changes: 1 addition & 1 deletion docs/usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ rendered from the HTML template.
.. code-block:: python
urlpatterns = [
url(r'^hello.pdf$', HelloPDFView.as_view())
path('hello.pdf', HelloPDFView.as_view())
]
You can also use a mixin to output PDF from Django generic views::
Expand Down
8 changes: 4 additions & 4 deletions tests/urls.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# coding=utf-8

from django.conf.urls import url
from django.urls import re_path

from easy_pdf.views import PDFTemplateView
from .views import DemoPDFView, PDFUserDetailView

urlpatterns = [
url(r'^demo/$', DemoPDFView.as_view()),
url(r'^simple/$', PDFTemplateView.as_view(template_name='simple.html')),
url(r'^user/(?P<pk>\d+)/$', PDFUserDetailView.as_view()),
re_path(r'^demo/$', DemoPDFView.as_view()),
re_path(r'^simple/$', PDFTemplateView.as_view(template_name='simple.html')),
re_path(r'^user/(?P<pk>\d+)/$', PDFUserDetailView.as_view()),
]

0 comments on commit da7751a

Please # to comment.