Compare commits

...

3 Commits

Author SHA1 Message Date
huwenlu d0b543519a Merge remote-tracking branch 'remotes/origin/master' into lwh
4 years ago
huwenlu 2eb5594729 Merge remote-tracking branch 'origin/master'
4 years ago
huwenlu 8e8827c3ef Merge remote-tracking branch 'remotes/origin/master' into lwh
4 years ago

@ -6,7 +6,7 @@ import sys
def main(): def main():
"""Run administrative tasks.""" """Run administrative tasks."""
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'mysite.settings') os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'start.settings')
try: try:
from django.core.management import execute_from_command_line from django.core.management import execute_from_command_line
except ImportError as exc: except ImportError as exc:

@ -1,3 +1,10 @@
from django.shortcuts import render from django.shortcuts import render # django的模板渲染包
# Create your views here. # Initializing the imports
import numpy as np # 矩阵运算
import urllib # url解析
import json # json字符串使用
import cv2 # opencv包
import os # 执行操作系统命令
from django.views.decorators.csrf import csrf_exempt # 跨站点验证
from django.http import JsonResponse # json字符串返回

@ -1,5 +1,5 @@
""" """
ASGI config for mysite project. ASGI config for start project.
It exposes the ASGI callable as a module-level variable named ``application``. It exposes the ASGI callable as a module-level variable named ``application``.
@ -11,6 +11,6 @@ import os
from django.core.asgi import get_asgi_application from django.core.asgi import get_asgi_application
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'mysite.settings') os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'start.settings')
application = get_asgi_application() application = get_asgi_application()

@ -1,5 +1,5 @@
""" """
Django settings for mysite project. Django settings for start project.
Generated by 'django-admin startproject' using Django 3.2.9. Generated by 'django-admin startproject' using Django 3.2.9.
@ -9,7 +9,7 @@ https://docs.djangoproject.com/en/3.2/topics/settings/
For the full list of settings and their values, see For the full list of settings and their values, see
https://docs.djangoproject.com/en/3.2/ref/settings/ https://docs.djangoproject.com/en/3.2/ref/settings/
""" """
import os
from pathlib import Path from pathlib import Path
# Build paths inside the project like this: BASE_DIR / 'subdir'. # Build paths inside the project like this: BASE_DIR / 'subdir'.
@ -37,6 +37,7 @@ INSTALLED_APPS = [
'django.contrib.sessions', 'django.contrib.sessions',
'django.contrib.messages', 'django.contrib.messages',
'django.contrib.staticfiles', 'django.contrib.staticfiles',
'mask',
] ]
MIDDLEWARE = [ MIDDLEWARE = [
@ -49,12 +50,12 @@ MIDDLEWARE = [
'django.middleware.clickjacking.XFrameOptionsMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware',
] ]
ROOT_URLCONF = 'mysite.urls' ROOT_URLCONF = 'start.urls'
TEMPLATES = [ TEMPLATES = [
{ {
'BACKEND': 'django.template.backends.django.DjangoTemplates', 'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [], 'DIRS': [os.path.join(BASE_DIR,'templates')],
'APP_DIRS': True, 'APP_DIRS': True,
'OPTIONS': { 'OPTIONS': {
'context_processors': [ 'context_processors': [
@ -67,7 +68,7 @@ TEMPLATES = [
}, },
] ]
WSGI_APPLICATION = 'mysite.wsgi.application' WSGI_APPLICATION = 'start.wsgi.application'
# Database # Database

@ -1,4 +1,4 @@
"""mysite URL Configuration """start URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see: The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/3.2/topics/http/urls/ https://docs.djangoproject.com/en/3.2/topics/http/urls/

@ -1,5 +1,5 @@
""" """
WSGI config for mysite project. WSGI config for start project.
It exposes the WSGI callable as a module-level variable named ``application``. It exposes the WSGI callable as a module-level variable named ``application``.
@ -11,6 +11,6 @@ import os
from django.core.wsgi import get_wsgi_application from django.core.wsgi import get_wsgi_application
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'mysite.settings') os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'start.settings')
application = get_wsgi_application() application = get_wsgi_application()
Loading…
Cancel
Save