From 7ee768a460bec2dca96f730eb24b507cc0add42e Mon Sep 17 00:00:00 2001 From: baoliang Date: Sun, 11 Oct 2020 17:16:54 +0800 Subject: [PATCH] add message --- polls/templates/polls/app.html | 8 ++++++++ polls/urls.py | 3 ++- polls/views/__init__.py | 2 +- .../views/__pycache__/__init__.cpython-38.pyc | Bin 1458 -> 1478 bytes .../views/__pycache__/download.cpython-38.pyc | Bin 723 -> 898 bytes polls/views/download.py | 5 +++++ 6 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 polls/templates/polls/app.html 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 1c84e1bfc56893c00754e0597c9411efb05c6e64..9d0c3f0880127c31f0c4939393429019af0675af 100644 GIT binary patch delta 87 zcmdnQeTX^O9!$Scbzvr$`=ktNq6%3`wv<2oiurdu2-`Q>>z`H3mF oI1>vB;xqF~it_z5EjRyRHe%!}G6ZT~$xvhkq>8L2o3mB}08`Q#LjV8( delta 66 zcmX@cy@{JQl$V!_0SGuxHpS;pnq9TOkpEsm7@^1Ph<#1ubGi_P3D UMvR;*8Hy}{%8M)~d$U#p04>ZA_y7O^ diff --git a/polls/views/__pycache__/download.cpython-38.pyc b/polls/views/__pycache__/download.cpython-38.pyc index 33d18a666bf3d4ec33f96ec1e9d0eef603d0a911..69bf51225b29a35a7bed5ec73e20dc9ed6c63eb2 100644 GIT binary patch delta 364 zcmYjNJx{|h5cQchajG`zfDl3~Y*a<%4aXa? z|6pUwA7SO3GH}*CpM3A$v;Ey%h4HY{X)%hcuhnG4%lHs3%l`2ZlMNj#!f^;pHf8Y6 z#zKZt&>l&+W4)++=#Mr~1*kHqa0*`IFMPd2c|mEtxMNEu;f>QAzj=*wqqRLv@_dlG zg~lc^dQgR^o(pB&hM`#h!0;d<#$=v3G=Uf51PsvYeSTcSJ%&_O(QK~OBu`vg@mX34 zR5mx6RVb*tg~;=SG%uMpiS+X}CScHoHmxq~!XDs0o%CARSr`1|w(82KBzrUin;LY} i!ddipsLgBUKl$2d>v6U)ve4?>e?a|kQR}z4X#4`51WnTb delta 188 zcmZo-zs$-P%FD~e00gclo8sRwPUMqeG?=KZ!ON1u+QJaUmckg!pvg9|M0;~OqZ^~z zE%u_+!qU{@l3Scn{GnfEA(JIsc 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')