[Answer]-Using 'is_authenticated' with Django 1.5 Custom User Models

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})

Leave a comment