Going Beyond Django’s Registration

Here’s a Django tutorial on registration. Registration allows you to have users. A weak registration system puts your site at risk of spammers getting in. A good registration system takes time to set up, even with the current handlers that Django has in place – while the basic functionality is already supported, such as sending emails, authentication, and user information storage, these functions are spread apart, and must still be lumped together by the django user.

Considering that a general system is truly necessary, it’s not surprising that the community has come up with django-registration.

Django registration provides all the basic necessities for making a good registration system for your site, from signup, email activation, and eventual login.

Installation

(0.8 alpha)

(0.7 build, not the tutorial followed here)

Then as usual, include in your INSTALLED_APPS

and define this constant

You also need to modify your urls.py to include the registration views,

Others

==== Setting up Email ====

http://docs.djangoproject.com/en/dev/topics/email/

==== templates ====

The user (you) will have to provide templates with the names specified by django-registration. Note that django-registration will not work without these templates/files.

==== Site Templates ====

  • registration/registration_form.html
  • registration/registration_complete.html
  • registration/activate.html
  • registration/activation_complete.html

==== Email Construction Templates ====

  • registration/activation_email_subject.txt
  • registration/activation_email.txt

Summary

It’s a shame that default basic templates weren’t provided, but with everything else that this system gets done, it’s a small price to pay.

(For reference, here is the template I made to test signing up.