Created
March 14, 2011 11:37
-
-
Save jie/869027 to your computer and use it in GitHub Desktop.
django:login new user after signup
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.contrib import auth | |
from django.contrib.auth.forms import UserCreationForm | |
form = UserCreationForm() | |
new_user=form.save() | |
new_user.backend="%s.%s" %('django.contrib.auth.backends','ModelBackend') | |
auth.login(request, new_user) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment