Add htmx autocomplete and allow merging of conditions

This commit is contained in:
Ross
2023-11-13 13:23:33 +00:00
parent 366d36ba24
commit 15915ef5c0
8 changed files with 119 additions and 3 deletions
+1
View File
@@ -75,6 +75,7 @@ INSTALLED_APPS = [
"django_htmx",
"crispy_forms",
"crispy_bootstrap4",
"autocomplete"
]
MIDDLEWARE = [
+8
View File
@@ -34,6 +34,7 @@ from rest_framework import routers
from django.conf.urls import handler400, handler403, handler404, handler500
from .api import api
from autocomplete import HTMXAutoComplete
router_drf = routers.DefaultRouter()
@@ -73,6 +74,12 @@ urlpatterns = [
path(
"accounts/create/", generic_views.create_user, name="create_user"
),
path(
"accounts/trainees/", generic_views.trainees, name="trainees"
),
path(
"accounts/trainees/<str:grade>/", generic_views.trainees, name="trainees_grade"
),
path(
"accounts/update/<str:slug>/",
views.UpdateUserView.as_view(),
@@ -152,6 +159,7 @@ urlpatterns = [
#path("cookies/", include("cookie_consent.urls")),
path("privacy/", views.privacy_view, name="privacy"),
# path('select2/', include('select2.urls')),
*HTMXAutoComplete.url_dispatcher('ac'),
]
# handler400 = 'my_app.views.bad_request'