# Django Toyo Auth
"Django Toyo Auth" offers providers of Toyo University Accounts(@toyo.jp) and INIAD Accounts(@iniad.org) for [django-allauth](https://django-allauth.readthedocs.io/en/latest/index.html)
## Installation
### Install Package
```bash
pip install django-toyo-auth
```
### settings.py
```python
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
```python
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
### django_toyo_auth.models.UUIDAbstractUser
Inherits all attributes and methods from [AbstractUser](#django_toyo_authmodelsabstractuser),
but also primary_key is UUID
#### Attributes
- uuid
### django_toyo_auth.admin.ToyoUserAdmin
ModelAdmin class for [AbstractUser](#django_toyo_authmodelsabstractuser).
It offers user-friendly admin pages.
### django_toyo_auth.admin.UUIDToyoUserAdmin
ModelAdmin class for [UUIDAbstractUser](#django_toyo_authmodelsuuidabstractuser).
It offers user-friendly admin pages.
## Details
It offers only providers and custom models for django-allauth.
Please see [django-allauth documents](https://django-allauth.readthedocs.io/en/latest/index.html) for detail
## Requirements
- [Django](https://docs.djangoproject.com/)
- [django-allauth](https://django-allauth.readthedocs.io/en/latest/index.html)
## License
MIT
Raw data
{
"_id": null,
"home_page": "http://github.com/ayame-q/django-toyo-auth",
"name": "django-toyo-auth",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.6,<4.0",
"maintainer_email": "",
"keywords": "django-allauth,django,INIAD,Toyo Univ,\u6771\u6d0b\u5927\u5b66",
"author": "ayame.space",
"author_email": "ayame.space@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/4c/9a/984140dba565c716b29d912bcea08fb04fbd808b5577777d43fa8c83a555/django_toyo_auth-0.9.0.tar.gz",
"platform": null,
"description": "# Django Toyo Auth\n\n\"Django Toyo Auth\" offers providers of Toyo University Accounts(@toyo.jp) and INIAD Accounts(@iniad.org) for [django-allauth](https://django-allauth.readthedocs.io/en/latest/index.html)\n\n## Installation\n\n### Install Package\n\n```bash\npip install django-toyo-auth\n```\n\n### settings.py\n\n```python\nINSTALLED_APPS = [\n ...\n 'django.contrib.auth',\n 'django.contrib.messages',\n 'django.contrib.sites',\n 'allauth',\n 'allauth.account',\n 'allauth.socialaccount',\n 'django_toyo_auth',\n 'django_toyo_auth.providers.iniad', # INIAD Account\n 'django_toyo_auth.providers.toyo', # Toyo Account\n ...\n]\n\nSITE_ID = 1\n\n# Provider specific settings\nSOCIALACCOUNT_PROVIDERS = {\n 'iniad': { # for INIAD Account\n 'SCOPE': [\n 'profile',\n 'email',\n ],\n 'AUTH_PARAMS': {\n 'access_type': 'online',\n },\n },\n 'toyo': { # for Toyo Account\n 'SCOPE': [\n 'profile',\n 'email',\n ],\n 'AUTH_PARAMS': {\n 'access_type': 'online',\n },\n },\n}\n```\n\n### urls.py\n\n```python\nurlpatterns = [\n ...\n path('accounts/', include('allauth.urls')),\n ...\n]\n```\n\n## Classes\n\n### django_toyo_auth.models.AbstractUser\n\nUser class with student_id, entry_year, is_student, is_toyo_member, is_iniad_member\n\n#### Attributes\n\n- student_id\n- entry_year\n- is_student\n- is_toyo_member\n- is_iniad_member\n- grade\n\n### django_toyo_auth.models.UUIDAbstractUser\n\nInherits all attributes and methods from [AbstractUser](#django_toyo_authmodelsabstractuser),\nbut also primary_key is UUID\n\n#### Attributes\n\n- uuid\n\n### django_toyo_auth.admin.ToyoUserAdmin\n\nModelAdmin class for [AbstractUser](#django_toyo_authmodelsabstractuser).\nIt offers user-friendly admin pages.\n\n### django_toyo_auth.admin.UUIDToyoUserAdmin\n\nModelAdmin class for [UUIDAbstractUser](#django_toyo_authmodelsuuidabstractuser).\nIt offers user-friendly admin pages.\n\n## Details\n\nIt offers only providers and custom models for django-allauth.\nPlease see [django-allauth documents](https://django-allauth.readthedocs.io/en/latest/index.html) for detail\n\n## Requirements\n\n- [Django](https://docs.djangoproject.com/)\n- [django-allauth](https://django-allauth.readthedocs.io/en/latest/index.html)\n\n## License\n\nMIT\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "It offers providers of Toyo University and INIAD Accounts for django-allauth",
"version": "0.9.0",
"split_keywords": [
"django-allauth",
"django",
"iniad",
"toyo univ",
"\u6771\u6d0b\u5927\u5b66"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "fb209bb88094889a366038b56ef9d07f1dc391e26717a7e404fa4491e034268e",
"md5": "7b9d72adca3e3bae670cf52e67785dbd",
"sha256": "0a98f32be89796c430d094d04331046cea0e5196994849bad830bf3aa8c69c3b"
},
"downloads": -1,
"filename": "django_toyo_auth-0.9.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "7b9d72adca3e3bae670cf52e67785dbd",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6,<4.0",
"size": 12706,
"upload_time": "2023-02-06T21:22:56",
"upload_time_iso_8601": "2023-02-06T21:22:56.350365Z",
"url": "https://files.pythonhosted.org/packages/fb/20/9bb88094889a366038b56ef9d07f1dc391e26717a7e404fa4491e034268e/django_toyo_auth-0.9.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "4c9a984140dba565c716b29d912bcea08fb04fbd808b5577777d43fa8c83a555",
"md5": "45c687ac9dcb9b5a7b7269a5efbc0b81",
"sha256": "7893bc927aae5f8fe36147d74e654c8ffd91a1bbc89b9d31f05f9a0db421963a"
},
"downloads": -1,
"filename": "django_toyo_auth-0.9.0.tar.gz",
"has_sig": false,
"md5_digest": "45c687ac9dcb9b5a7b7269a5efbc0b81",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6,<4.0",
"size": 8115,
"upload_time": "2023-02-06T21:22:58",
"upload_time_iso_8601": "2023-02-06T21:22:58.031444Z",
"url": "https://files.pythonhosted.org/packages/4c/9a/984140dba565c716b29d912bcea08fb04fbd808b5577777d43fa8c83a555/django_toyo_auth-0.9.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-02-06 21:22:58",
"github": true,
"gitlab": false,
"bitbucket": false,
"github_user": "ayame-q",
"github_project": "django-toyo-auth",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "django-toyo-auth"
}