test auto deploy

This commit is contained in:
w-mj
2020-02-11 12:37:01 +08:00
parent 7108823aae
commit 6dc80cddf0
6 changed files with 33 additions and 3 deletions
+7
View File
@@ -0,0 +1,7 @@
pip install mysqlclient
pip install geetest
pip install requests
pip install bs4
pip install icalendar
pip install django==2.1.4
python -m pip install Pillow
+7
View File
@@ -0,0 +1,7 @@
from django.urls import path
from hospital import views
urlpatterns = [
path('index', views.index),
]
+3
View File
@@ -1,3 +1,6 @@
from django.shortcuts import render
# Create your views here.
def index(request):
return render(request, "hospital/index.html")
+10
View File
@@ -0,0 +1,10 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>在线医疗系统</title>
</head>
<body>
<h1>在线医疗系统</h1>
</body>
</html>
+2 -2
View File
@@ -27,7 +27,7 @@ BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
SECRET_KEY = secrets.SECRET_KEY
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = socket.gethostname() == 'DESKTOP-0D3RQ6Q'
DEBUG = socket.gethostname() != 'VM-125-218-ubuntu'
ALLOWED_HOSTS = ['127.0.0.1', 'fun.alphamj.cn', '123.206.57.166', 'chatbot.alphamj.cn']
@@ -79,7 +79,7 @@ WSGI_APPLICATION = 'website.wsgi.application'
# Database
# https://docs.djangoproject.com/en/2.1/ref/settings/#databases
if socket.gethostname() == 'DESKTOP-0D3RQ6Q':
if socket.gethostname() != 'VM-125-218-ubuntu':
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
+4 -1
View File
@@ -22,6 +22,7 @@ import chatbot.auth
import chatbot.func
import dialog_label.urls
import schedule.urls
import hospital.urls
from website import settings
from .deploy import deploy
from .captcha import pc_getcaptcha, pc_validate
@@ -55,7 +56,9 @@ urlpatterns = [
path('schedule/', include(schedule.urls)),
path('label/', include(dialog_label.urls)),
path('a/', a)
path('a/', a),
path('hospital/', include(hospital.urls))
]
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)