1 2 3 4 | def login_on_activation(sender, user, request, **kwargs):
user.backend='django.contrib.auth.backends.ModelBackend'
login(request,user)
user_activated.connect(login_on_activation)
|
More like this
- Show logged users - keeping track of users login and logout by albertorcf 8 months, 2 weeks ago
- Registration with confirmation email by catellar 1 year, 9 months ago
- Using manager methods by ubernostrum 6 years, 2 months ago
- Django Registration without username by newmaniese 5 years, 1 month ago
- Django Registration with GMail account by btbytes 6 years, 1 month ago
Comments
I was just looking for this. Thanks.
#
Just a note: This requires the unreleased version of django-registration. The version that's released on PyPI (and that you will get via pip), doesn't appear to emit signals.
#
Need a little help? What is 'sender' in this function? My thoughts were to call this function from with the registration.activate view.
#