I have been getting this error

ValueError at /signup/

The view accounts.views.signup didn't return an HttpResponse object. It
returned None instead.

This are the codes

*accounts/**views.py*

from django.contrib.auth import login as auth_login from
django.contrib.auth.forms import UserCreationForm from django.shortcuts
import render, redirect def signup(request): if request.method == 'POST':
form = UserCreationForm(request.POST) if form.is_valid(): user =
form.save() auth_login(request, user) return redirect('home') else: form =
UserCreationForm() return render(request, 'signup.html', {'form': form})

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAPkbFba3o99dr8Ze7%2BN7c2Ejx8XZ4gUvVe%2Bi4ZiDF5oDSBc%2Bnw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to