Implement OTP and show received callbacks

This commit is contained in:
2022-10-15 21:51:47 +01:00
parent 8369f44bd4
commit 361b7b96f0
17 changed files with 396 additions and 155 deletions

View File

@@ -16,11 +16,13 @@ Including another URLconf
from django.conf import settings
from django.conf.urls.static import static
from django.contrib import admin
from django.contrib.auth.views import LoginView
from django.urls import include, path
from django.views.generic import TemplateView
from django_otp.forms import OTPAuthenticationForm
from core.views import base, hooks
from core.views.callbacks import Callback
from core.views import base, callbacks, hooks
from core.views.stripe_callbacks import Callback
urlpatterns = [
path("__debug__/", include("debug_toolbar.urls")),
@@ -38,7 +40,10 @@ urlpatterns = [
),
path("cancel/", TemplateView.as_view(template_name="cancel.html"), name="cancel"),
path("portal", base.Portal.as_view(), name="portal"),
path("admin/", admin.site.urls),
path("sapp/", admin.site.urls),
path(
"accounts/login/", LoginView.as_view(authentication_form=OTPAuthenticationForm)
),
path("accounts/", include("django.contrib.auth.urls")),
path("accounts/signup/", base.Signup.as_view(), name="signup"),
path("hooks/<str:type>/", hooks.Hooks.as_view(), name="hooks"),
@@ -48,6 +53,17 @@ urlpatterns = [
"hooks/page/del/<str:hook_id>/", hooks.HookAction.as_view(), name="hook_action"
),
path(
"hooks/page/edit/<str:hook_id>/", hooks.HookAction.as_view(), name="hook_action"
"hooks/modal/edit/<str:hook_id>/",
hooks.HookAction.as_view(),
name="hook_action",
),
path(
f"{settings.HOOK_PATH}/<str:hook_name>/", hooks.HookAPI.as_view(), name="hook"
),
path(
"callbacks/<str:type>/<str:hook_id>/",
callbacks.Callbacks.as_view(),
name="callbacks",
),
path("callbacks/<str:type>/", callbacks.Callbacks.as_view(), name="callbacks"),
] + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)