Issue
Admin user model does not update new records when registered using UserCreationForm.
Her Usercreationform is shown below with imported views and I did all the coding for the views. I don’t know where I went wrong. It also rendered the form correctly in the template. But the annoying part is after filling out the form. Even if I access it, it is not updated in the admin panel
// view
from django.shortcuts import render
Import HttpResponse from django.http
Import UserCreationForm from django.contrib.auth.forms
Deaf Home (request):
If request.method == "POST":
Form = UserCreationForm(request.POST)
For form.is_valid() :
form.save()
context = {'form':form}
return render(request, 'main/index.html', context)
// template
Documents