It offers providers of Toyo University and INIAD Accounts for django-allauth
Project description
"Django Toyo Auth" offers providers of Toyo University Accounts(@toyo.jp) and INIAD Accounts(@iniad.org) for django-allauth
Installation
Install Package
pip install django-toyo-auth
settings.py
INSTALLED_APPS = [
...
'django.contrib.auth',
'django.contrib.messages',
'django.contrib.sites',
'allauth',
'allauth.account',
'allauth.socialaccount',
'django_toyo_auth',
'django_toyo_auth.providers.iniad', # INIAD Account
'django_toyo_auth.providers.toyo', # Toyo Account
...
]
SITE_ID = 1
# Provider specific settings
SOCIALACCOUNT_PROVIDERS = {
'iniad': { # for INIAD Account
'SCOPE': [
'profile',
'email',
],
'AUTH_PARAMS': {
'access_type': 'online',
},
},
'toyo': { # for Toyo Account
'SCOPE': [
'profile',
'email',
],
'AUTH_PARAMS': {
'access_type': 'online',
},
},
}
urls.py
urlpatterns = [
...
path('accounts/', include('allauth.urls')),
...
]
Classes
django_toyo_auth.models.AbstractUser
User class with student_id, entry_year, is_student, is_toyo_member, is_iniad_member
Attributes
- student_id
- entry_year
- is_student
- is_toyo_member
- is_iniad_member
- grade_gap
methods
- get_grade() => int
django_toyo_auth.models.UUIDAbstractUser
Inherits all attributes and methods from AbstractUser, but also primary_key is UUID
Attributes
- uuid
Details
It offers only providers and custom models for django-allauth. Please see django-allauth documents for detail
Requirements
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
django_toyo_auth-0.4.0.tar.gz
(8.5 kB
view hashes)
Built Distribution
Close
Hashes for django_toyo_auth-0.4.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6156111bac3f2c3210582ac42948948fac00f07e5e83b6dd824674b83f9702f3 |
|
MD5 | 2a2fcd3ff41c4bbb624f402f5a5218ed |
|
BLAKE2b-256 | abb9107b28a454156368c0d9f9a40b94547e850ac81d66ce357c3f6156e9674c |