Django auth app!
Project description
django-auth
^^^^^^^^
Note: This project is still under-development.
Author: 234082230@qq.com
Introduction
---------
- Added fields country_code, mobile to django_auth.models.User(User)
- Added register, login page using Vue.js
- Added register, login, verify code API
- Added Aliyun SMS for verify code sending
- Added UserAdmin, UserManager
settings.py
---------
::
INSTALLED_APPS = [
...
'django_auth',
...
]
TEMPLATES = [
{
...
'DIRS': ['templates'],
...
}
]
urls.py
---------
::
from django.conf import settings
from django.conf.urls import url, include
from django.conf.urls.static import static
from django.contrib import admin
from django.views.i18n import JavaScriptCatalog
from django_auth.views.user import UserLoginView, UserLogoutView, UserRegisterView
urlpatterns = [
url(r'^jsi18n/$', JavaScriptCatalog.as_view(), name='javascript-catalog'),
url(r'^admin/', admin.site.urls),
url(r'^login', UserLoginView.as_view()),
url(r'^register', UserRegisterView.as_view()),
url(r'^logout', UserLogoutView.as_view()),
url(r'^api/auth/', include('django_auth.urls', namespace='django-auth')),
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
Aliyun SMS
---------
settings.py
>>>>>>>>>
::
ACCESS_KEY_ID = ''
ACCESS_KEY_SECRET = ''
REGION = ''
SMS_SIGN = ''
SMS_TPL_LOGIN_CN_ID = 'SMS_XXX'
SMS_TPL_LOGIN_FOREIGN_ID = 'SMS_XXX'
SMS_TPL_FORGETPASSWD_CN_ID = 'SMS_XXX'
SMS_TPL_FORGETPASSWD_FOREIGN_ID = 'SMS_XXX'
SMS_TPL_REGISTER_CN_ID = 'SMS_XXX'
SMS_TPL_REGISTER_FOREIGN_ID = 'SMS_XXX'
^^^^^^^^
Note: This project is still under-development.
Author: 234082230@qq.com
Introduction
---------
- Added fields country_code, mobile to django_auth.models.User(User)
- Added register, login page using Vue.js
- Added register, login, verify code API
- Added Aliyun SMS for verify code sending
- Added UserAdmin, UserManager
settings.py
---------
::
INSTALLED_APPS = [
...
'django_auth',
...
]
TEMPLATES = [
{
...
'DIRS': ['templates'],
...
}
]
urls.py
---------
::
from django.conf import settings
from django.conf.urls import url, include
from django.conf.urls.static import static
from django.contrib import admin
from django.views.i18n import JavaScriptCatalog
from django_auth.views.user import UserLoginView, UserLogoutView, UserRegisterView
urlpatterns = [
url(r'^jsi18n/$', JavaScriptCatalog.as_view(), name='javascript-catalog'),
url(r'^admin/', admin.site.urls),
url(r'^login', UserLoginView.as_view()),
url(r'^register', UserRegisterView.as_view()),
url(r'^logout', UserLogoutView.as_view()),
url(r'^api/auth/', include('django_auth.urls', namespace='django-auth')),
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
Aliyun SMS
---------
settings.py
>>>>>>>>>
::
ACCESS_KEY_ID = ''
ACCESS_KEY_SECRET = ''
REGION = ''
SMS_SIGN = ''
SMS_TPL_LOGIN_CN_ID = 'SMS_XXX'
SMS_TPL_LOGIN_FOREIGN_ID = 'SMS_XXX'
SMS_TPL_FORGETPASSWD_CN_ID = 'SMS_XXX'
SMS_TPL_FORGETPASSWD_FOREIGN_ID = 'SMS_XXX'
SMS_TPL_REGISTER_CN_ID = 'SMS_XXX'
SMS_TPL_REGISTER_FOREIGN_ID = 'SMS_XXX'
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-auth-0.1.9.tar.gz
(368.0 kB
view details)
Built Distribution
django_auth-0.1.9-py3-none-any.whl
(383.5 kB
view details)
File details
Details for the file django-auth-0.1.9.tar.gz
.
File metadata
- Download URL: django-auth-0.1.9.tar.gz
- Upload date:
- Size: 368.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 72d8342b2396af78a4dfdd42eb5a3c7b6e3a875209f700fc4360c9228a67449a |
|
MD5 | 94cbc37514d7a7ed05694d26ce3f81e4 |
|
BLAKE2b-256 | 455b209271e185332bb7ad0e88337fcaee0e7c81809d92cc263cdc8ea11a010d |
File details
Details for the file django_auth-0.1.9-py3-none-any.whl
.
File metadata
- Download URL: django_auth-0.1.9-py3-none-any.whl
- Upload date:
- Size: 383.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3595842d875388844a49dc1ffa0ea3059c2c399df91f787b1e4a7dd41a55d652 |
|
MD5 | d51f24740af7c7d3b3a8763b78ab2521 |
|
BLAKE2b-256 | 4394f455a48f56e6434c9b6c07e21feadc5d99b2770a5b2e399bbad08ec3bf6b |