diff --git a/dependent.txt b/dependent.txt new file mode 100644 index 0000000..25c5721 --- /dev/null +++ b/dependent.txt @@ -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 \ No newline at end of file diff --git a/hospital/urls.py b/hospital/urls.py new file mode 100644 index 0000000..fa2dfd6 --- /dev/null +++ b/hospital/urls.py @@ -0,0 +1,7 @@ +from django.urls import path + +from hospital import views + +urlpatterns = [ + path('index', views.index), +] \ No newline at end of file diff --git a/hospital/views.py b/hospital/views.py index 91ea44a..dfda633 100644 --- a/hospital/views.py +++ b/hospital/views.py @@ -1,3 +1,6 @@ from django.shortcuts import render # Create your views here. + +def index(request): + return render(request, "hospital/index.html") \ No newline at end of file diff --git a/templates/hospital/index.html b/templates/hospital/index.html new file mode 100644 index 0000000..859fdca --- /dev/null +++ b/templates/hospital/index.html @@ -0,0 +1,10 @@ + + + + + 在线医疗系统 + + +

在线医疗系统

+ + \ No newline at end of file diff --git a/website/settings.py b/website/settings.py index e433301..f9ffac8 100644 --- a/website/settings.py +++ b/website/settings.py @@ -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', diff --git a/website/urls.py b/website/urls.py index 1d451ed..c8f34aa 100644 --- a/website/urls.py +++ b/website/urls.py @@ -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)