Просмотр исходного кода

Dropped backward compatibility for the /admin/webhook-backend-status URL

Jeremy Stretch 5 лет назад
Родитель
Сommit
bb1484a444
2 измененных файлов с 3 добавлено и 16 удалено
  1. 2 1
      docs/release-notes/version-2.9.md
  2. 1 15
      netbox/netbox/urls.py

+ 2 - 1
docs/release-notes/version-2.9.md

@@ -16,4 +16,5 @@ NetBox v2.9 replaces Django's built-in permissions framework with one that suppo
 
 
 * The `secrets.activate_userkey` permission no longer exists. Instead, `secrets.change_userkey` is checked to determine whether a user has the ability to activate a UserKey.
 * The `secrets.activate_userkey` permission no longer exists. Instead, `secrets.change_userkey` is checked to determine whether a user has the ability to activate a UserKey.
 * The `users.delete_token` permission is no longer enforced. All users are permitted to delete their own API tokens.
 * The `users.delete_token` permission is no longer enforced. All users are permitted to delete their own API tokens.
-* Backward compatibility for the `webhooks` Redis queue configuration has been dropped. (Use `tasks` instead.)
+* Dropped backward compatibility for the `webhooks` Redis queue configuration (use `tasks` instead).
+* Dropped backward compatibility for the `/admin/webhook-backend-status` URL (moved to `/admin/background-tasks/`).

+ 1 - 15
netbox/netbox/urls.py

@@ -1,7 +1,6 @@
 from django.conf import settings
 from django.conf import settings
 from django.conf.urls import include
 from django.conf.urls import include
-from django.urls import path, re_path, reverse
-from django.views.generic.base import RedirectView
+from django.urls import path, re_path
 from django.views.static import serve
 from django.views.static import serve
 from drf_yasg import openapi
 from drf_yasg import openapi
 from drf_yasg.views import get_schema_view
 from drf_yasg.views import get_schema_view
@@ -12,17 +11,6 @@ from users.views import LoginView, LogoutView
 from .admin import admin_site
 from .admin import admin_site
 
 
 
 
-# TODO: Remove in v2.9
-class RQRedirectView(RedirectView):
-    """
-    Temporary 301 redirect from the old URL to the new one.
-    """
-    permanent = True
-
-    def get_redirect_url(self, *args, **kwargs):
-        return reverse('rq_home')
-
-
 openapi_info = openapi.Info(
 openapi_info = openapi.Info(
     title="NetBox API",
     title="NetBox API",
     default_version='v2',
     default_version='v2',
@@ -77,8 +65,6 @@ _patterns = [
     # Admin
     # Admin
     path('admin/', admin_site.urls),
     path('admin/', admin_site.urls),
     path('admin/background-tasks/', include('django_rq.urls')),
     path('admin/background-tasks/', include('django_rq.urls')),
-    # TODO: Remove in v2.9
-    path('admin/webhook-backend-status/', RQRedirectView.as_view()),
 
 
     # Errors
     # Errors
     path('media-failure/', StaticMediaFailureView.as_view(), name='media_failure'),
     path('media-failure/', StaticMediaFailureView.as_view(), name='media_failure'),