What is django-userena?
django-userena is a Django application that supplies your Django project with full account management. It’s a fully customizable application that takes care of the signup, activation, messaging and more.
How to install django-userena?
You can install the latest version of django-userena using:
pip install django-userena
How to setup django-userena?
Add AUTHETICATION_BACKEND tuple as given below:
AUTHENTICATION_BACKENDS = (
Add userena, gaurdian and easy_thumbnails to your INSTALLED_APPS settings of your project.
Userena has a URLConf that sets all the url’s and views for you. This should be included in your project’s URLConf. For example, if you wants the urls to show up under ‘/accounts/’, add the following under urlpattern in you URLConf.
1. Django-guardian requires you to set the ANONYMOUS_USER_ID setting.
ANONYMOUS_USER_ID = -1
2. Set AUTH_PROFILE_MODULE point to the model that is your custom made profile.For example: set AUTH_PROFILE_MODULE to the path of MyProfile
from userena.models import UserenaBaseProfile
user = models.OneToOneField(User,
favourite_snack = models.CharField(_('favourite snack'),
3. To integrate with Django, you need to alter three settings to reflect in you URI.
For example, if your userena lives under ‘/accounts/’
LOGIN_REDIRECT_URL = '/accounts/%(username)s/'
LOGIN_URL = '/accounts/signin/'
LOGOUT_URL = '/accounts/signout/'