Django闩锁模块。
django-latch的Python项目详细描述
django闩锁
Django和Latch集成。最初由javier olascoaga和RootedCON开发。
要求
- python 3.4、3.5、3.6、3.7
- Django 2.0、2.1、2.2
安装
要安装它,只需运行:
$ pip install django-latch
或者,如果您希望从源安装:
$ git clone https://github.com/javimoral/django-latch.git
$ cd django-latch
$ python setup.py install
配置
在settings.py
文件中,需要添加以下指令:
INSTALLED_APPS=([...]'latch',)# Add auth profileAUTH_PROFILE_MODULE='latch.UserProfile'# Append Latch Auth Backend the first in listAUTHENTICATION_BACKENDS=['latch.auth_backend.LatchAuthBackend',[...]]LATCH_APP_ID=<APPId># You can use os.environ if you preferLATCH_APP_SECRET=<APPSecret>LATCH_BYPASS_WHEN_UNREACHABLE=True# True is the default behaviour. Configure as you need.
配置应用程序URL
fromdjango.urlsimportpath,includeurlpatterns=[[...]path('latch/',include('latch.urls'))[...]]
然后应用迁移
$ python manage.py makemigrations
有关详细信息,请参阅documentation。
错误和请求
请在github问题跟踪器中报告任何错误/问题或功能请求。
https://github.com/javimoral/django-latch/issues
许可证
此模块在Apache2.0许可下发布。有关详细信息,请参见许可证文件。
latch-sdk-python
在gnu通用公共许可证2.0下发布。权限属于elevenpaths、更多信息和更新版本,位于:
https://github.com/ElevenPaths/latch-sdk-python
作者
最初由javier olascoaga和RootedCON开发。