{"id":22916748,"url":"https://github.com/chanmo/django-social-cn","last_synced_at":"2025-04-01T12:44:34.790Z","repository":{"id":57422078,"uuid":"200340783","full_name":"ChanMo/django-social-cn","owner":"ChanMo","description":"基于django的社交帐号模块","archived":false,"fork":false,"pushed_at":"2020-08-04T01:38:20.000Z","size":54,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-05T17:49:11.992Z","etag":null,"topics":["django-social","douyin","qq","wechat"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ChanMo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-08-03T06:29:00.000Z","updated_at":"2021-07-27T01:11:59.000Z","dependencies_parsed_at":"2022-09-06T12:02:24.168Z","dependency_job_id":null,"html_url":"https://github.com/ChanMo/django-social-cn","commit_stats":null,"previous_names":["chanmo/django-social"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChanMo%2Fdjango-social-cn","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChanMo%2Fdjango-social-cn/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChanMo%2Fdjango-social-cn/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChanMo%2Fdjango-social-cn/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ChanMo","download_url":"https://codeload.github.com/ChanMo/django-social-cn/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246642183,"owners_count":20810557,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["django-social","douyin","qq","wechat"],"created_at":"2024-12-14T06:14:33.392Z","updated_at":"2025-04-01T12:44:34.766Z","avatar_url":"https://github.com/ChanMo.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Django Social APP\n\n基于django的社交帐号APP\n\n包含微信APP, 微信小程序, 微信公众号, 抖音小程序, QQ开放平台等\n\n\n## Quick start\n\n1. 更新`settings.py`\n\n```python\nINSTALLED_APPS = [\n    ...\n    'social',\n]\n```\n\n2. 执行`python manage.py migrate`\n\n## Web使用\n用于微信web开放平台, 微信公众号, QQ开放平台\n\n### AuthView\n\n方式一, 直接使用\n修改`urls.py`\n```python\nfrom social.views import AuthView\n\nurlpatterns = [\n    ...\n    path('social/\u003cslug:provider\u003e/', AuthView.as_view()),\n]\n```\n\n方式二, 继承\n修改`views.py`\n\n```python\nfrom social.views import AuthView as BaseAuthView\n\nclass AuthView(BaseAuthView):\n    success_url = '/success/'\n```\n\n## API使用\n用于微信APP, 微信小程序, 抖音小程序\n\nAPI使用[django-rest-framework](https://www.django-rest-framework.org/)框架, Token使用[django-rest-framework-simplejwt](https://github.com/davesque/django-rest-framework-simplejwt)\n\n安装依赖\n\n```bash\n$ pip install djangorestfamework\n$ pip install django-rest-famework-simplejwt\n\n```\n\n直接使用\n\n```\nfrom social.apis import AuthView, SocialUpdateView\n\nurlpatterns = [\n    ...\n    path('social/auth/\u003cslug:provider\u003e/', AuthView.as_view()),\n    path('social/update/', SocialUpdateView.as_view()),\n]\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchanmo%2Fdjango-social-cn","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchanmo%2Fdjango-social-cn","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchanmo%2Fdjango-social-cn/lists"}