diff --git a/polls/templates/polls/app.html b/polls/templates/polls/app.html new file mode 100644 index 0000000..c81fa9a --- /dev/null +++ b/polls/templates/polls/app.html @@ -0,0 +1,8 @@ +{% extends 'polls/base.html' %} +{% block content%} +
+
+ 下载APP +
+
+{% endblock%} diff --git a/polls/urls.py b/polls/urls.py index 1ae50ff..d0e51fa 100644 --- a/polls/urls.py +++ b/polls/urls.py @@ -65,5 +65,6 @@ urlpatterns = [ name='polls_message_check'), path('messages/read/', views.read_message, name='polls_message_read'), - path('app/download/', views.download, name='polls_app_download') + path('app/intro/', views.app_intro, name='polls_app_intro'), + path('app/download/', views.download, name='polls_app_download') ] diff --git a/polls/views/__init__.py b/polls/views/__init__.py index a66de32..03f69ff 100644 --- a/polls/views/__init__.py +++ b/polls/views/__init__.py @@ -8,4 +8,4 @@ from .group import groups, room, is_level1_or_leve2, group_member, group_manager from .compartment import compartments from .organizations import organizations, organization_level from .message import last_messages, send_text_message, is_read_message, read_message -from .download import download +from .download import download, app_intro diff --git a/polls/views/__pycache__/__init__.cpython-38.pyc b/polls/views/__pycache__/__init__.cpython-38.pyc index 1c84e1b..9d0c3f0 100644 Binary files a/polls/views/__pycache__/__init__.cpython-38.pyc and b/polls/views/__pycache__/__init__.cpython-38.pyc differ diff --git a/polls/views/__pycache__/download.cpython-38.pyc b/polls/views/__pycache__/download.cpython-38.pyc index 33d18a6..69bf512 100644 Binary files a/polls/views/__pycache__/download.cpython-38.pyc and b/polls/views/__pycache__/download.cpython-38.pyc differ diff --git a/polls/views/download.py b/polls/views/download.py index 1feb757..0ccf0b3 100644 --- a/polls/views/download.py +++ b/polls/views/download.py @@ -1,6 +1,11 @@ import os from django.conf import settings from django.http import HttpResponse, Http404 +from django.shortcuts import render + +def app_intro(request): + return render(request, 'polls/app.html') + def download(request): file_path = os.path.join(settings.MEDIA_ROOT, 'pom.apk')