Skip to content

Commit

Permalink
ralat csrf exempt
Browse files Browse the repository at this point in the history
  • Loading branch information
fathonidf committed Nov 21, 2023
1 parent 56ee36e commit 6ab4c60
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions main/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand All @@ -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')
Expand Down

0 comments on commit 6ab4c60

Please sign in to comment.