Login

Tag "django-registration"

Snippet List

login on activation with django-registration

Here's a signal handler to log a user in on registration activation. It took me an hour to figure out that I needed to put the user.backend in quotes and google wasn't being my friend. from [the django-registration documentation](http://docs.b-list.org/django-registration/0.8/faq.html): How do I log a user in immediately after registration or activation? You can most likely do this simply by writing a function which listens for the appropriate signal; your function should set the backend attribute of the user to the correct authentication backend, and then call django.contrib.auth.login() to log the user in.

  • login
  • auth
  • django-registration
Read More

Django Registration with GMail account

This code works with Django-registration app found here: http://code.google.com/p/django-registration/ If you plan to use this django-registrtion code in your website to allow user registration but do not run your own email server,this snippet can be handy. It uses gmail server to send out email. You have to install libgmail module first. Add two lines to your `settings.py` GMAIL_USERNAME = '[email protected]' GMAIL_PASSWORD = 'your_password' Change models.py - create_inactive_user(...) as given above

  • registration
  • email
  • gmail
  • django-registration
Read More

3 snippets posted so far.