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():
"""Run administrative tasks."""
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'mysite.settings')
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'start.settings')
try:
from django.core.management import execute_from_command_line
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``.
@ -11,6 +11,6 @@ import os
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()

@ -1,5 +1,5 @@
"""
Django settings for mysite project.
Django settings for start project.
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
https://docs.djangoproject.com/en/3.2/ref/settings/
"""
import os
from pathlib import Path
# Build paths inside the project like this: BASE_DIR / 'subdir'.
@ -37,6 +37,7 @@ INSTALLED_APPS = [
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'mask',
]
MIDDLEWARE = [
@ -49,12 +50,12 @@ MIDDLEWARE = [
'django.middleware.clickjacking.XFrameOptionsMiddleware',
]
ROOT_URLCONF = 'mysite.urls'
ROOT_URLCONF = 'start.urls'
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [],
'DIRS': [os.path.join(BASE_DIR,'templates')],
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
@ -67,7 +68,7 @@ TEMPLATES = [
},
]
WSGI_APPLICATION = 'mysite.wsgi.application'
WSGI_APPLICATION = 'start.wsgi.application'
# Database

@ -1,4 +1,4 @@
"""mysite URL Configuration
"""start URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
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``.
@ -11,6 +11,6 @@ import os
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()
Loading…
Cancel
Save