Django Social APP
基于django的社交帐号APP
包含微信APP, 微信小程序, 微信公众号, 抖音小程序, QQ开放平台等
Quick start
- 更新
settings.py
INSTALLED_APPS = [
...
'social',
]
- 执行
python manage.py migrate
Web使用
AuthView
from social.views.AuthView
方式一, 直接使用
修改urls.py
from social.views import AuthView
urlpatterns = [
...
path('social/<slug:provider>/', AuthView.as_view()),
]
方式二, 继承
修改views.py
from social.views import AuthView as BaseAuthView
class AuthView(BaseAuthView):
success_url = '/success/'
API使用
API使用django-rest-framework框架, Token使用django-rest-framework-simplejwt
安装依赖
$ pip install djangorestfamework
$ pip install django-rest-famework-simplejwt
直接使用
from social.apis import AuthView, SocialUpdateView
urlpatterns = [
...
path('social/auth/<slug:provider>/', AuthView.as_view()),
path('social/update/', SocialUpdateView.as_view()),
]
Metadata
Release files for django-social-cn 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| django-social-cn-0.1.1.tar.gz | 9.2 kB | Without provenance | Details for django-social-cn-0.1.1.tar.gz |
Security for django-social-cn 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.