{"id":23927034,"url":"https://github.com/edison7500/django-leancloud-sms","last_synced_at":"2026-05-14T22:03:26.614Z","repository":{"id":57420632,"uuid":"99312165","full_name":"edison7500/django-leancloud-sms","owner":"edison7500","description":"Django LeanCloud SMS ","archived":false,"fork":false,"pushed_at":"2017-08-10T02:38:39.000Z","size":45,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-06T05:15:52.110Z","etag":null,"topics":["django","leancloud","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/edison7500.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":"2017-08-04T06:43:01.000Z","updated_at":"2017-11-23T03:10:16.000Z","dependencies_parsed_at":"2022-09-16T14:22:51.145Z","dependency_job_id":null,"html_url":"https://github.com/edison7500/django-leancloud-sms","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edison7500%2Fdjango-leancloud-sms","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edison7500%2Fdjango-leancloud-sms/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edison7500%2Fdjango-leancloud-sms/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edison7500%2Fdjango-leancloud-sms/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/edison7500","download_url":"https://codeload.github.com/edison7500/django-leancloud-sms/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240400339,"owners_count":19795332,"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","leancloud","python"],"created_at":"2025-01-05T22:13:25.272Z","updated_at":"2025-11-16T22:01:52.147Z","avatar_url":"https://github.com/edison7500.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Django Leancloud SMS\n[![Build Status](https://travis-ci.org/edison7500/django-leancloud-sms.svg?branch=master)](https://travis-ci.org/edison7500/django-leancloud-sms)\n\n## 安装\n```bash\npip install django-leancloud-sms\n\n# or \n\npip install requests # requests be must \u003e= 2.1\ngit clone https://github.com/edison7500/django-leancloud-sms.git\ncd django-leancloud-sms\npython setup.py install\n \n```\n\n## 使用方法\n1. 在 django settings.py 设置以下配置\n```python\n\nLEANCLOUD_HEADERS = {\n    \"X-LC-Id\": \"\u003creplace your x-lc-id\u003e\",\n    \"X-LC-Key\": \"\u003creplace your x-lc-key\u003e\",\n    \"Content-Type\": \"application/json\"\n}\n\nLEANCLOUD_SMS_NAME = \"\u003creplace your name\u003e\"\n\n```\n2. 在 Django View 中使用\n```python\n'''\nDJANGO Views.py\n'''\nfrom django.http import JsonResponse\nfrom leancloud.sms import LeanCloudSMS\n\n\ndef send_sms_view(request):\n    phone_num = request.GET.get('num')\n    sms = LeanCloudSMS()\n    data, msg = sms.send_sms(phone_number=phone_num) # 发送验证码\n    return JsonResponse(status=200, data={\n                                        'status':data,\n                                        'msg':msg\n                                    })\n\ndef verify_phone_code(request):\n    phone_num = request.GET.get('num')\n    v_code = request.GET.get('vcode')\n    sms = LeanCloudSMS()\n    data, msg = sms.verify_phone_code(phone_number=phone_num, verify_code=v_code) # 验证手机验证码\n    return JsonResponse(status=200, data={\n                                        'status':data,\n                                        'msg':msg\n                                    })\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fedison7500%2Fdjango-leancloud-sms","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fedison7500%2Fdjango-leancloud-sms","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fedison7500%2Fdjango-leancloud-sms/lists"}