Django auth app!
Project description
# django-auth
This project is still under-development.
## 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
### Author: 234082230@qq.com
## 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']
```
This project is still under-development.
## 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
### Author: 234082230@qq.com
## 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.5.tar.gz
(362.6 kB
view hashes)
Built Distribution
django_auth-0.1.5-py2-none-any.whl
(375.8 kB
view hashes)
Close
Hashes for django_auth-0.1.5-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 628e7f58777549ffbbbafa76f1cb80763501ac484ea5f2ceaf6d6e5ed57b2bd3 |
|
MD5 | 093d18eeb75f2cd5db6bf75dad833001 |
|
BLAKE2b-256 | 275a64a4f5c4da6daa90a8266516120f01efa453d738cf5b6ca2230b25f51838 |