Giter Club home page Giter Club logo

django-quanttide-iam's Introduction

django-quanttide-idam

量潮身份与访问管理Django工具箱

Installation

Install the package with pip.

pip install django-quanttide-idam

Add django_quanttide_idam to your INSTALLED_APPS in Django settings.py.

# settings.py

INSTALLED_APPS = [
    ...,
    'rest_framework',
    ...,
    'django_quanttide_idam',
    ...
]

Usage

修改Auth用户模型

# settings.py

AUTH_USER_MODEL = 'django_quanttide_idam.AuthUser'

修改REST Framework的默认Auth和Permission类

# settings.py

REST_FRAMEWORK = {
    ...,
    'DEFAULT_AUTHENTICATION_CLASSES': [
        'django_quanttide_idam.authentication.IDTokenAuthentication',
    ],
    ...,
    'DEFAULT_PERMISSION_CLASSES': [
        'django_quanttide_idam.permissions.IsAdminUserOrIsAuthenticatedReadOnly',
    ],
}

License

This package uses Apache 2.0 License

Changelog

CHANGELOG

django-quanttide-iam's People

Contributors

coldlink7 avatar guo-zhang avatar

Watchers

 avatar

django-quanttide-iam's Issues

教育经历

Django模型:

from django.db import models

class Education(models.Model):
    school = models.CharField(max_length=255, verbose_name='学校')
    college = models.CharField(max_length=255, verbose_name='学院')
    department = models.CharField(max_length=255, verbose_name='系')
    major = models.CharField(max_length=255, verbose_name='专业')
    degree = models.CharField(max_length=16, verbose_name='学历')
    start_year = models.IntegerField(verbose_name='入学年份')
    end_year = models.IntegerField(verbose_name='毕业年份')

    class Meta:
        verbose_name = '教育经历'
        verbose_name_plural = '教育经历'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.