2019-01-11 19:23:22 | 作者: 耘涛 | 标签: 次序,出来,参阅 | 浏览: 1797
pip install django-userena
You need to make some changes Django settings if you want to use Userena in your project. This means modifying AUTHENTICATION_BACKENDS, INSTALLED_APPS and optionally MIDDLEWARE_CLASSES.
Begin by adding , guardian and easy_thumbnails to the INSTALLED_APPS in your settings.py file of your project. django.contrib.sites must also be present if it is not already (see Django docs.).
Next add UserenaAuthenticationBackend and ObjectPermissionBackend also in your settings.py file, from django-guardian, at the top of AUTHENTICATION_BACKENDS. If you only have Django’s default backend, adding django-guardian and that of userena will get the following: