增加用户登录

包括用户model、用户登录模板、登录api和测试。
This commit is contained in:
virusdefender
2015-06-29 12:43:17 +08:00
parent 00052d8e9b
commit 592720dd01
11 changed files with 175 additions and 7 deletions

View File

@@ -46,6 +46,12 @@ INSTALLED_APPS = (
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'account',
'rest_framework',
'rest_framework_swagger',
)
MIDDLEWARE_CLASSES = (
@@ -113,6 +119,12 @@ STATIC_URL = '/static/'
STATICFILES_DIRS = (os.path.join(BASE_DIR, "static"),)
TEMPLATE_DIRS = (
os.path.join(BASE_DIR, "template"),
)
AUTH_USER_MODEL = 'account.User'
LOGGING = {
'version': 1,
'disable_existing_loggers': True,
@@ -147,7 +159,7 @@ LOGGING = {
},
'django.db.backends': {
'handlers': ['console'],
'level': 'DEBUG',
'level': 'ERROR',
'propagate': True,
}
},