The v0.5.x versions of django-socialregistration require at least Django v1.3.2 due to the use of class based views. For previous versions of Django please use django-socialregistration v0.4.x.


pip install django-socialregistration
pip install -e git+


The most basic configuration is to add socialregistration and django.contrib.sites to your INSTALLED_APPS



To make sure that your redirects and callbacks work properly you’ll have to set the domain in the Sites app to the correct value.

If you find yourself redirected to, check your Sites configuration through the Django admin interface.

Include socialregistration.urls into your root file

urlpatterns = patterns('',
# Here be other urls ...
        url(r'^social/', include('socialregistration.urls',
                namespace = 'socialregistration')))


The namespace = 'socialregistration' argument is required.

Include django.core.context_processors.request in your TEMPLATE_CONTEXT_PROCESSORS in your settings file



When your views render templates that include social registration tags (such as {% twitter_button %}) they will need to pass the RequestContext in as a parameter

return render_to_response('template.html', c, context_instance=RequestContext(request))

Note on sessions

When starting the registration process, all the user’s temporary data is stored in the user’s session. If you’re developing on, you will have to set your callback URLs to begin with too or you will get a new session when returning to the site and socialregistration won’t be able to find the temporary data and subsequently throw a KeyError.

Also not that Twitter for example will not accept http://localhost:8000 as a valid domain for the callback URL so you’ll have to use when developing your site.