diff --git a/project/npda/templates/npda/visit_form.html b/project/npda/templates/npda/visit_form.html index ba47c119..c9a52263 100644 --- a/project/npda/templates/npda/visit_form.html +++ b/project/npda/templates/npda/visit_form.html @@ -5,7 +5,8 @@
{{title}} -
+ {% csrf_token %} {% for field in form %} {% if field.field.category is None %} @@ -164,6 +165,7 @@ {% endif %}
+
{% endblock %} \ No newline at end of file diff --git a/project/settings.py b/project/settings.py index 77d9ef54..a2b6df5c 100644 --- a/project/settings.py +++ b/project/settings.py @@ -79,6 +79,7 @@ "django.contrib.sessions", "django.contrib.messages", "django.contrib.staticfiles", + "django_htmx", # "django.forms", "rest_framework", "drf_spectacular", @@ -103,6 +104,7 @@ "django.contrib.auth.middleware.AuthenticationMiddleware", "django.contrib.messages.middleware.MessageMiddleware", "django.middleware.clickjacking.XFrameOptionsMiddleware", + "django_htmx.middleware.HtmxMiddleware", # 2 factor authentication "django_otp.middleware.OTPMiddleware", ]