From 6ab4c601f1d296d22937d6e0d14adc8a7764a6ed Mon Sep 17 00:00:00 2001 From: fathonidf Date: Tue, 21 Nov 2023 23:16:54 +0700 Subject: [PATCH] ralat csrf exempt --- main/views.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/main/views.py b/main/views.py index e54041b..1004ac3 100644 --- a/main/views.py +++ b/main/views.py @@ -42,6 +42,7 @@ def create_item(request): context = {'form': form} return render(request, "create_item.html", context) +@csrf_exempt def register(request): form = UserCreationForm() @@ -54,6 +55,7 @@ def register(request): context = {'form':form} return render(request, 'register.html', context) +@csrf_exempt def login_user(request): if request.method == 'POST': username = request.POST.get('username')