diff --git a/CHANGELOG.md b/CHANGELOG.md index e63fea6..248e000 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,10 @@ Changelog ========= +## v3.1.0 - 2021/12/22 + +- Added support for Django 4.0 + ## v3.0.0 - 2021/05/10 - Dropped support for Python 2 diff --git a/rules/__init__.py b/rules/__init__.py index 23fc3b7..4295de5 100644 --- a/rules/__init__.py +++ b/rules/__init__.py @@ -21,4 +21,4 @@ test_rule, ) -VERSION = (3, 0, 0, "final", 1) +VERSION = (3, 1, 0, "final", 1) diff --git a/tests/testapp/urls.py b/tests/testapp/urls.py index e7229bf..b3fcde2 100644 --- a/tests/testapp/urls.py +++ b/tests/testapp/urls.py @@ -1,5 +1,5 @@ -from django.conf.urls import url from django.contrib import admin +from django.urls import re_path from .views import ( BookCreateView, @@ -18,40 +18,40 @@ admin.autodiscover() urlpatterns = [ - url(r"^admin/", admin.site.urls), + re_path(r"^admin/", admin.site.urls), # Function-based views - url(r"^(?P\d+)/change/$", change_book, name="change_book"), - url(r"^(?P\d+)/delete/$", delete_book, name="delete_book"), - url(r"^(?P\d+)/raise/$", view_that_raises, name="view_that_raises"), - url(r"^(?P\d+)/object/$", view_with_object, name="view_with_object"), - url( + re_path(r"^(?P\d+)/change/$", change_book, name="change_book"), + re_path(r"^(?P\d+)/delete/$", delete_book, name="delete_book"), + re_path(r"^(?P\d+)/raise/$", view_that_raises, name="view_that_raises"), + re_path(r"^(?P\d+)/object/$", view_with_object, name="view_with_object"), + re_path( r"^(?P\d+)/list/$", view_with_permission_list, name="view_with_permission_list", ), # Class-based views - url(r"^cbv/create/$", BookCreateView.as_view(), name="cbv.create_book"), - url( + re_path(r"^cbv/create/$", BookCreateView.as_view(), name="cbv.create_book"), + re_path( r"^cbv/(?P\d+)/change/$", BookUpdateView.as_view(), name="cbv.change_book", ), - url( + re_path( r"^cbv/(?P\d+)/delete/$", BookDeleteView.as_view(), name="cbv.delete_book", ), - url( + re_path( r"^cbv/(?P\d+)/raise/$", ViewThatRaises.as_view(), name="cbv.view_that_raises", ), - url( + re_path( r"^cbv/(?P\d+)/list/$", ViewWithPermissionList.as_view(), name="cbv.view_with_permission_list", ), - url( + re_path( r"^cbv/(?P\d+)/change-error/$", BookUpdateErrorView.as_view(), name="cbv.change_book_error",