Skip to main content

A simple Dingding auth Django app.

Project description

Dingo-Auth-Dingding

a dingding app auth django app. you should have follow this section to configure dingding app.

Quick start

  1. Add "polls" to your INSTALLED_APPS setting like this::
 INSTALLED_APPS = [
 ...
 'django_auth_dingding',
 ]
  1. Include the URLconf in your project urls.py like this::
path('dingding/', include("django_auth_dingding.urls")),
  1. Add ding_user_id field to User Model like this::
from django.contrib.auth.models import AbstractUser

class Users(AbstractUser):
    ...
    ding_user_id = models.CharField("钉钉UserID", max_length=64, blank=True)
  1. Setting config in your django's settings.py like this::
INSTALLED_APPS += ("django_auth_dingding",)
AUTHENTICATION_BACKENDS = (
    "django_auth_dingding.auth.DingdingAuthenticationBackend",
    "django.contrib.auth.backends.ModelBackend",
)
DINGDING_AUTH_AUTHENTICATION_CALLBACK_URL = env("DINGDING_AUTH_AUTHENTICATION_CALLBACK_URL")
DINGDING_AUTH_APP_KEY = env("DINGDING_AUTH_APP_KEY")
DINGDING_AUTH_APP_SECRET = env("DINGDING_AUTH_APP_SECRET")
  1. Run python manage.py migrate to Modify the User models.

  2. Browser visit http://{host}:{port}/dingding/authenticate/ will redirect to dingding auth page

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django_auth_dingding-0.0.3.tar.gz (6.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

django_auth_dingding-0.0.3-py3-none-any.whl (7.3 kB view details)

Uploaded Python 3

File details

Details for the file django_auth_dingding-0.0.3.tar.gz.

File metadata

  • Download URL: django_auth_dingding-0.0.3.tar.gz
  • Upload date:
  • Size: 6.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.11

File hashes

Hashes for django_auth_dingding-0.0.3.tar.gz
Algorithm Hash digest
SHA256 61ea958a1170ae49acf8eb519750ef93de2f59e6ab2126515810b5bb3e834b5c
MD5 b9982f17542ebde2b466e7fa1827669f
BLAKE2b-256 d1fbacaf6acfda78225e9911229dabf48398e97840b371290ef6ea35fbdee062

See more details on using hashes here.

File details

Details for the file django_auth_dingding-0.0.3-py3-none-any.whl.

File metadata

File hashes

Hashes for django_auth_dingding-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 5c18b4392f358cf76ad90b947b30779f12f93a71e377f1b375312f272a0fb2de
MD5 29148116d80247c2576b6401bc5a0822
BLAKE2b-256 70afeb004f3c6543984a241937dbfef1a14030dd54141170036dd896946d4df1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page