add message

This commit is contained in:
baoliang 2020-10-11 17:16:54 +08:00
parent 6369750bf5
commit 7ee768a460
6 changed files with 16 additions and 2 deletions

View File

@ -0,0 +1,8 @@
{% extends 'polls/base.html' %}
{% block content%}
<div class="col-xs-12">
<div style="text-align: center; margin: 50px auto">
<a href="/polls/app/download/">下载APP</a>
</div>
</div>
{% endblock%}

View File

@ -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')
]

View File

@ -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

View File

@ -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')