1👍
✅
As the error states, there is no “u” attribute on the request object. Simply change request.u
to request.user
.
def index(request):
form = CustomUserCreationForm()
if request.user.is_authenticated():
form2 = CustomUserChangeForm(instance=request.user)
return render(request, "index.html", {'form2': form2})
Source:stackexchange.com