Skip to content

Commit

Permalink
Remove django-hijack and django-sniplates
Browse files Browse the repository at this point in the history
  • Loading branch information
Viicos committed Feb 14, 2024
1 parent 4fe2ab9 commit 307d78e
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 35 deletions.
2 changes: 0 additions & 2 deletions requirements/base.in
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,9 @@ jsonschema
django
django-admin-index
django-axes
django-hijack
django-jsonsuit
django-redis
django-rosetta
django-sniplates
maykin-django-two-factor-auth
maykin-django-two-factor-auth[phonenumbers]
mozilla-django-oidc-db
Expand Down
6 changes: 0 additions & 6 deletions requirements/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ django==3.2.20
# django-choices
# django-filter
# django-formtools
# django-hijack
# django-jsonform
# django-jsonsuit
# django-otp
Expand All @@ -78,7 +77,6 @@ django==3.2.20
# django-rest-framework-condition
# django-rosetta
# django-simple-certmanager
# django-sniplates
# django-solo
# djangorestframework
# drf-nested-routers
Expand All @@ -102,8 +100,6 @@ django-filter==23.2
# commonground-api-common
django-formtools==2.4.1
# via maykin-django-two-factor-auth
django-hijack==3.3.0
# via -r requirements/base.in
django-ipware==6.0.3
# via django-axes
django-jsonform==2.21.5
Expand All @@ -130,8 +126,6 @@ django-sendfile2==0.7.0
# via django-privates
django-simple-certmanager==1.3.0
# via zgw-consumers
django-sniplates==0.7.1
# via -r requirements/base.in
django-solo==2.0.0
# via
# commonground-api-common
Expand Down
6 changes: 0 additions & 6 deletions requirements/ci.txt
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@ django==3.2.20
# django-choices
# django-filter
# django-formtools
# django-hijack
# django-jenkins
# django-jsonform
# django-jsonsuit
Expand All @@ -114,7 +113,6 @@ django==3.2.20
# django-rosetta
# django-sendfile2
# django-simple-certmanager
# django-sniplates
# django-solo
# djangorestframework
# drf-nested-routers
Expand Down Expand Up @@ -142,8 +140,6 @@ django-formtools==2.4.1
# via
# -r requirements/base.txt
# maykin-django-two-factor-auth
django-hijack==3.3.0
# via -r requirements/base.txt
django-ipware==6.0.3
# via
# -r requirements/base.txt
Expand Down Expand Up @@ -192,8 +188,6 @@ django-simple-certmanager==1.3.0
# via
# -r requirements/base.txt
# zgw-consumers
django-sniplates==0.7.1
# via -r requirements/base.txt
django-solo==2.0.0
# via
# -r requirements/base.txt
Expand Down
6 changes: 0 additions & 6 deletions requirements/dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,6 @@ django==3.2.20
# django-extensions
# django-filter
# django-formtools
# django-hijack
# django-jenkins
# django-jsonform
# django-jsonsuit
Expand All @@ -134,7 +133,6 @@ django==3.2.20
# django-rosetta
# django-sendfile2
# django-simple-certmanager
# django-sniplates
# django-solo
# djangorestframework
# drf-nested-routers
Expand Down Expand Up @@ -166,8 +164,6 @@ django-formtools==2.4.1
# via
# -r requirements/ci.txt
# maykin-django-two-factor-auth
django-hijack==3.3.0
# via -r requirements/ci.txt
django-ipware==6.0.3
# via
# -r requirements/ci.txt
Expand Down Expand Up @@ -216,8 +212,6 @@ django-simple-certmanager==1.3.0
# via
# -r requirements/ci.txt
# zgw-consumers
django-sniplates==0.7.1
# via -r requirements/ci.txt
django-solo==2.0.0
# via
# -r requirements/ci.txt
Expand Down
14 changes: 0 additions & 14 deletions src/objecttypes/conf/base.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import os

# Django-hijack (and Django-hijack-admin)
from django.urls import reverse_lazy

from sentry_sdk.integrations import django, redis
Expand Down Expand Up @@ -69,9 +68,6 @@
# External applications.
"axes",
"jsonsuit.apps.JSONSuitConfig",
"sniplates",
"hijack",
"hijack.contrib.admin",
"mozilla_django_oidc",
"mozilla_django_oidc_db",
"django_jsonform",
Expand Down Expand Up @@ -104,7 +100,6 @@
"django.contrib.messages.middleware.MessageMiddleware",
"django.middleware.clickjacking.XFrameOptionsMiddleware",
"axes.middleware.AxesMiddleware",
"hijack.middleware.HijackUserMiddleware",
"django_otp.middleware.OTPMiddleware",
]

Expand Down Expand Up @@ -359,15 +354,6 @@
"REMOTE_ADDR",
)

# Django-Hijack
HIJACK_LOGIN_REDIRECT_URL = "/"
HIJACK_LOGOUT_REDIRECT_URL = reverse_lazy("admin:accounts_user_changelist")
# The Admin mixin is used because we use a custom User-model.
HIJACK_REGISTER_ADMIN = False
# This is a CSRF-security risk.
# See: http://django-hijack.readthedocs.io/en/latest/configuration/#allowing-get-method-for-hijack-views
HIJACK_ALLOW_GET_REQUESTS = True

# Sentry SDK
SENTRY_DSN = config("SENTRY_DSN", None)

Expand Down
1 change: 0 additions & 1 deletion src/objecttypes/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
auth_views.PasswordResetDoneView.as_view(),
name="password_reset_done",
),
path("admin/hijack/", include("hijack.urls")),
path("admin/", admin.site.urls),
path(
"reset/<uidb64>/<token>/",
Expand Down

0 comments on commit 307d78e

Please sign in to comment.