django userena 运用ITeye - 凯发娱乐

django userena 运用ITeye

2019-01-11 19:23:22 | 作者: 耘涛 | 标签: 次序,出来,参阅 | 浏览: 1797

参阅  http://docs.django-userena.org/en/latest/installation.html#required-settings

 

我用的是django1.9.7, userena2.0.1

本来文档的次序跑不出来, 我跑出来的次序是

1  

 pip install django-userena

 

2  

Required settings

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:

版权声明
本文来源于网络,版权归原作者所有,其内容与观点不代表凯发娱乐立场。转载文章仅为传播更有价值的信息,如采编人员采编有误或者版权原因,请与我们联系,我们核实后立即修改或删除。

猜您喜欢的文章