Merge branch 'master' of https://e.coding.net/ctcdevteam/examtest
|
@ -2,7 +2,6 @@
|
|||
.vscode/
|
||||
.vs/
|
||||
venv/
|
||||
media/
|
||||
__pycache__/
|
||||
*.pyc
|
||||
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
.vscode/
|
||||
.vs/
|
||||
venv/
|
||||
!media/default/*
|
||||
!media/muban/*
|
||||
__pycache__/
|
||||
*.pyc
|
||||
server/conf*.py
|
||||
dist/*
|
||||
log/*
|
|
@ -35,7 +35,7 @@ from rbac.models import UserProfile
|
|||
from django.http import Http404
|
||||
from .spider import getZs
|
||||
import time
|
||||
from server.config import *
|
||||
from server.conf import *
|
||||
from .hwmsg import sendMsg
|
||||
|
||||
def my_payload_handler(user, dtype="admin"):
|
||||
|
|
Before Width: | Height: | Size: 530 KiB |
Before Width: | Height: | Size: 468 KiB |
Before Width: | Height: | Size: 181 KiB |
Before Width: | Height: | Size: 153 KiB |
Before Width: | Height: | Size: 181 KiB |
Before Width: | Height: | Size: 153 KiB |
Before Width: | Height: | Size: 181 KiB |
Before Width: | Height: | Size: 940 KiB |
Before Width: | Height: | Size: 940 KiB |
Before Width: | Height: | Size: 940 KiB |
Before Width: | Height: | Size: 940 KiB |
Before Width: | Height: | Size: 940 KiB |
Before Width: | Height: | Size: 940 KiB |
Before Width: | Height: | Size: 940 KiB |
Before Width: | Height: | Size: 940 KiB |
Before Width: | Height: | Size: 940 KiB |
Before Width: | Height: | Size: 940 KiB |
Before Width: | Height: | Size: 940 KiB |
Before Width: | Height: | Size: 940 KiB |
Before Width: | Height: | Size: 940 KiB |
Before Width: | Height: | Size: 940 KiB |
Before Width: | Height: | Size: 940 KiB |
Before Width: | Height: | Size: 1.5 MiB |
|
@ -27,7 +27,7 @@ from ..serializers.user_serializer import (UserCreateSerializer,
|
|||
UserInfoListSerializer,
|
||||
UserListSerializer,
|
||||
UserModifySerializer)
|
||||
from server.config import *
|
||||
from server.conf import *
|
||||
from rest_framework_jwt.serializers import jwt_encode_handler
|
||||
from crm.views import my_payload_handler
|
||||
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
appid = 'wxf1e9471c93f05ad6'
|
||||
secret = '4bf7f9bd6c52634586bbe792a1f0a834'
|
||||
sms_appid = '100172'
|
||||
sms_appsecret = '00b8681c-0ce6-41c8-a867-904c1891c78a'
|
||||
sms_url = 'https://sms.zhenzikj.com'
|
|
@ -13,7 +13,7 @@ https://docs.djangoproject.com/en/3.0/ref/settings/
|
|||
import os
|
||||
import datetime
|
||||
import sys
|
||||
|
||||
from . import conf
|
||||
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
|
||||
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
||||
|
||||
|
@ -25,7 +25,7 @@ BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
|||
SECRET_KEY = '+*j($q+46c*1qre8227=(b$(d@lro0)vllts%l%*8)z5$x#=tx'
|
||||
|
||||
# SECURITY WARNING: don't run with debug turned on in production!
|
||||
DEBUG = True
|
||||
DEBUG = conf.DEBUG
|
||||
|
||||
ALLOWED_HOSTS = ['*']
|
||||
|
||||
|
@ -98,20 +98,7 @@ CACHES = {
|
|||
# Database
|
||||
# https://docs.djangoproject.com/en/3.0/ref/settings/#databases
|
||||
|
||||
DATABASES = {
|
||||
'default': {
|
||||
'ENGINE': 'django.db.backends.postgresql',
|
||||
'NAME': 'zkfs',
|
||||
'USER':'ctcuser',
|
||||
'PASSWORD':'zkfs1234',
|
||||
'HOST':'116.63.176.211',
|
||||
'PORT':'5432',
|
||||
},
|
||||
# 'default': {
|
||||
# 'ENGINE': 'django.db.backends.sqlite3',
|
||||
# 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
|
||||
# }
|
||||
}
|
||||
DATABASES = conf.DATABASES
|
||||
|
||||
|
||||
# Password validation
|
||||
|
@ -151,7 +138,7 @@ USE_TZ = True
|
|||
# https://docs.djangoproject.com/en/3.0/howto/static-files/
|
||||
|
||||
STATIC_URL = '/static/'
|
||||
STATIC_ROOT = os.path.join(BASE_DIR,'static')
|
||||
STATIC_ROOT = os.path.join(BASE_DIR, 'dist/static')
|
||||
|
||||
REST_FRAMEWORK = {
|
||||
'DEFAULT_AUTHENTICATION_CLASSES': [
|
||||
|
|
|
@ -24,21 +24,25 @@ from utils.file import UploadFileView
|
|||
from utils.view import redirect
|
||||
|
||||
urlpatterns = [
|
||||
path('rbac/', include('rbac.urls')),
|
||||
path('vod/', include('vod.urls')),
|
||||
path('develop/', include('develop.urls')),
|
||||
path('crm/', include('crm.urls')),
|
||||
path('question/', include('question.urls')),
|
||||
path('examtest/', include('examtest.urls')),
|
||||
path('cms/', include('cms.urls')),
|
||||
path('analyse/', include('analyse.urls')),
|
||||
path('qtest/', include('qtest.urls')),
|
||||
path('token/', obtain_jwt_token),
|
||||
path('token/refresh/', refresh_jwt_token),
|
||||
path('token/verify/', verify_jwt_token),
|
||||
path('token/remove/', UserLogoutView.as_view()),
|
||||
path('uploadfile/', UploadFileView.as_view()),
|
||||
path('redirect/',redirect),
|
||||
path('admin/', admin.site.urls),
|
||||
path('docs/', include_docs_urls(title="答题平台接口文档",authentication_classes=[], permission_classes=[])),
|
||||
path('api/rbac/', include('rbac.urls')),
|
||||
path('api/vod/', include('vod.urls')),
|
||||
path('api/develop/', include('develop.urls')),
|
||||
path('api/crm/', include('crm.urls')),
|
||||
path('api/question/', include('question.urls')),
|
||||
path('api/examtest/', include('examtest.urls')),
|
||||
path('api/cms/', include('cms.urls')),
|
||||
path('api/analyse/', include('analyse.urls')),
|
||||
path('api/qtest/', include('qtest.urls')),
|
||||
path('api/token/', obtain_jwt_token),
|
||||
path('api/token/refresh/', refresh_jwt_token),
|
||||
path('api/token/verify/', verify_jwt_token),
|
||||
path('api/token/remove/', UserLogoutView.as_view()),
|
||||
path('api/uploadfile/', UploadFileView.as_view()),
|
||||
path('api/redirect/',redirect),
|
||||
|
||||
# django后台
|
||||
path('django/admin/doc/', include('django.contrib.admindocs.urls')),
|
||||
path('django/admin/', admin.site.urls),
|
||||
path('django/api-auth/', include('rest_framework.urls')),
|
||||
path('api/docs/', include_docs_urls(title="答题平台接口文档",authentication_classes=[], permission_classes=[])),
|
||||
]+ static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)+ static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
|
||||
|
|