diff --git a/CONTRIBUTORS.txt b/CONTRIBUTORS.txt index 539f24d..feb790d 100644 --- a/CONTRIBUTORS.txt +++ b/CONTRIBUTORS.txt @@ -33,6 +33,8 @@ Direct Contributors * Sam Spencer * Ben Wilber * Mfon Eti-mfon +* Irtaza Akram + Other Contributors ================== diff --git a/setup.cfg b/setup.cfg index 561c2d2..a0c8e1f 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 1.15.0 +current_version = 1.16.0 commit = True tag = True diff --git a/setup.py b/setup.py index 7b2901f..ff8ff90 100644 --- a/setup.py +++ b/setup.py @@ -50,6 +50,9 @@ def parse_dist_meta(): "Framework :: Django", "Framework :: Django :: 2.2", "Framework :: Django :: 3.2", + "Framework :: Django :: 4.0", + "Framework :: Django :: 4.1", + "Framework :: Django :: 4.2", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Natural Language :: English", diff --git a/tests/settings.py b/tests/settings.py index 2de0172..48bff8a 100644 --- a/tests/settings.py +++ b/tests/settings.py @@ -6,7 +6,6 @@ TIME_ZONE = "UTC" LANGUAGE_CODE = "en-US" SITE_ID = 1 -USE_L10N = True USE_TZ = True SECRET_KEY = "local" diff --git a/tests/urls.py b/tests/urls.py index bbccef0..9680438 100644 --- a/tests/urls.py +++ b/tests/urls.py @@ -1,40 +1,41 @@ from django.contrib.auth.views import LoginView +from django.urls import path from django.urls import include, re_path from . import views urlpatterns = [ # LoginRequiredMixin tests - re_path(r"^login_required/$", views.LoginRequiredView.as_view()), + path("login_required/", views.LoginRequiredView.as_view()), # AnonymousRequiredView tests - re_path( - r"^unauthenticated_view/$", + path( + "unauthenticated_view/", views.AnonymousRequiredView.as_view(), name="unauthenticated_view", ), - re_path( - r"^authenticated_view/$", + path( + "authenticated_view/", views.AuthenticatedView.as_view(), name="authenticated_view", ), # AjaxResponseMixin tests - re_path(r"^ajax_response/$", views.AjaxResponseView.as_view()), + path("ajax_response/", views.AjaxResponseView.as_view()), # CreateAndRedirectToEditView tests - re_path(r"^article/create/$", views.CreateArticleView.as_view()), - re_path( - r"^article/(?P\d+)/edit/$", + path("article/create/", views.CreateArticleView.as_view()), + path( + "article//edit/", views.EditArticleView.as_view(), name="edit_article", ), - re_path( - r"^article_list/create/$", + path( + "article_list/create/", views.CreateArticleAndRedirectToListView.as_view(), ), - re_path( - r"^article_list_bad/create/$", + path( + "article_list_bad/create/", views.CreateArticleAndRedirectToListViewBad.as_view(), ), - re_path( - r"^article_list/$", + path( + "article_list/", views.ArticleListView.as_view(), name="article_list", ), @@ -60,80 +61,80 @@ name="canonical_model", ), # UserFormKwargsMixin tests - re_path(r"^form_with_user_kwarg/$", views.FormWithUserKwargView.as_view()), + path("form_with_user_kwarg/", views.FormWithUserKwargView.as_view()), # SetHeadlineMixin tests - re_path(r"^headline/$", views.HeadlineView.as_view(), name="headline"), - re_path(r"^headline/lazy/$", views.LazyHeadlineView.as_view()), + path("headline/", views.HeadlineView.as_view(), name="headline"), + path("headline/lazy/", views.LazyHeadlineView.as_view()), re_path(r"^headline/(?P[\w-]+)/$", views.DynamicHeadlineView.as_view()), # ExtraContextMixin tests - re_path(r"^context/$", views.ContextView.as_view(), name="context"), + path("context/", views.ContextView.as_view(), name="context"), # PermissionRequiredMixin tests - re_path(r"^permission_required/$", views.PermissionRequiredView.as_view()), + path("permission_required/", views.PermissionRequiredView.as_view()), # MultiplePermissionsRequiredMixin tests - re_path( - r"^multiple_permissions_required/$", + path( + "multiple_permissions_required/", views.MultiplePermissionsRequiredView.as_view(), ), # SuperuserRequiredMixin tests - re_path(r"^superuser_required/$", views.SuperuserRequiredView.as_view()), + path("superuser_required/", views.SuperuserRequiredView.as_view()), # StaffuserRequiredMixin tests - re_path(r"^staffuser_required/$", views.StaffuserRequiredView.as_view()), + path("staffuser_required/", views.StaffuserRequiredView.as_view()), # GroupRequiredMixin tests - re_path(r"^group_required/$", views.GroupRequiredView.as_view()), + path("group_required/", views.GroupRequiredView.as_view()), # UserPassesTestMixin tests - re_path(r"^user_passes_test/$", views.UserPassesTestView.as_view()), + path("user_passes_test/", views.UserPassesTestView.as_view()), # UserPassesTestMixin tests - re_path( - r"^user_passes_test_not_implemented/$", + path( + "user_passes_test_not_implemented/", views.UserPassesTestNotImplementedView.as_view(), ), # CsrfExemptMixin tests - re_path(r"^csrf_exempt/$", views.CsrfExemptView.as_view()), + path("csrf_exempt/", views.CsrfExemptView.as_view()), # JSONResponseMixin tests - re_path(r"^simple_json/$", views.SimpleJsonView.as_view()), - re_path( - r"^simple_json_custom_encoder/$", views.CustomJsonEncoderView.as_view() + path("simple_json/", views.SimpleJsonView.as_view()), + path( + "simple_json_custom_encoder/", views.CustomJsonEncoderView.as_view() ), - re_path(r"^simple_json_400/$", views.SimpleJsonBadRequestView.as_view()), - re_path(r"^article_list_json/$", views.ArticleListJsonView.as_view()), + path("simple_json_400/", views.SimpleJsonBadRequestView.as_view()), + path("article_list_json/", views.ArticleListJsonView.as_view()), # JsonRequestResponseMixin tests - re_path(r"^json_request/$", views.JsonRequestResponseView.as_view()), - re_path(r"^json_bad_request/$", views.JsonBadRequestView.as_view()), - re_path( - r"^json_custom_bad_request/$", views.JsonCustomBadRequestView.as_view() + path("json_request/", views.JsonRequestResponseView.as_view()), + path("json_bad_request/", views.JsonBadRequestView.as_view()), + path( + "json_custom_bad_request/", views.JsonCustomBadRequestView.as_view() ), # FormMessagesMixin tests - re_path(r"form_messages/$", views.FormMessagesView.as_view()), + path("form_messages/", views.FormMessagesView.as_view()), # AllVerbsMixin tests - re_path(r"all_verbs/$", views.AllVerbsView.as_view()), - re_path( - r"all_verbs_no_handler/$", views.AllVerbsView.as_view(all_handler=None) + path("all_verbs/", views.AllVerbsView.as_view()), + path( + "all_verbs_no_handler/", views.AllVerbsView.as_view(all_handler=None) ), # SSLRequiredMixin tests - re_path(r"^sslrequired/$", views.SSLRequiredView.as_view()), + path("sslrequired/", views.SSLRequiredView.as_view()), # RecentLoginRequiredMixin tests - re_path(r"^recent_login/$", views.RecentLoginRequiredView.as_view()), - re_path(r"^outdated_login/$", views.RecentLoginRequiredView.as_view()), + path("recent_login/", views.RecentLoginRequiredView.as_view()), + path("outdated_login/", views.RecentLoginRequiredView.as_view()), # HeaderMixin tests - re_path(r'^headers/attribute/$', views.AttributeHeaderView.as_view()), - re_path(r'^headers/method/$', views.MethodHeaderView.as_view()), - re_path(r'^headers/existing/$', views.ExistingHeaderView.as_view()), + path('headers/attribute/', views.AttributeHeaderView.as_view()), + path('headers/method/', views.MethodHeaderView.as_view()), + path('headers/existing/', views.ExistingHeaderView.as_view()), # CacheControlMixin tests - re_path(r'^cachecontrol/public/$', views.CacheControlPublicView.as_view()), + path('cachecontrol/public/', views.CacheControlPublicView.as_view()), # NeverCacheMixin tests - re_path(r'^nevercache/$', views.NeverCacheView.as_view()), + path('nevercache/', views.NeverCacheView.as_view()), ] urlpatterns += [ - re_path( - r"^accounts/login/$", LoginView.as_view(template_name="blank.html") + path( + "accounts/login/", LoginView.as_view(template_name="blank.html") ), - re_path(r"^auth/login/$", LoginView.as_view(template_name="blank.html")), + path("auth/login/", LoginView.as_view(template_name="blank.html")), ] urlpatterns += [ - re_path( - r"^article-canonical-namespaced/", + path( + "article-canonical-namespaced/", include( ("tests.urls_namespaced", "tests"), namespace="some_namespace" ),