Пример #1
0
def setting(request):
    context = kvs()
    # print(context)
    if not session_valid(request):
        return script('location.href="http://" + location.host + "/login"')
    return render(request, "mng/setting.html", context)
Пример #2
0
def download(request):
    docs = all_files()
    context = {'docs': docs}
    if not session_valid(request):
        return script('location.href="http://" + location.host + "/login"')
    return render(request, 'mng/download.html', context)
Пример #3
0
def publish(request):
    context = {}
    if not session_valid(request):
        return script('location.href="http://" + location.host + "/login"')
    return render(request, 'mng/publish.html', context)
Пример #4
0
def key_valid(request):
    if request.POST['key'] == '*****@*****.**':
        request.session['legal'] = True
        return script('location.href="http://" + location.host')
    else:
        return login(request)
Пример #5
0
def need_login(request):
    if not session_valid(request):
        return script('location.href="http://" + location.host + "/login"')
Пример #6
0
def view(request, year, month, day):
    context = query_when(year, month, day)
    if not session_valid(request):
        return script('location.href="http://" + location.host + "/login"')
    return render(request, 'mng/view.html', context)
Пример #7
0
def export_html(request):
    if not session_valid(request):
        return script('location.href="http://" + location.host + "/login"')
    return render(request, 'mng/export.html', {})
Пример #8
0
def publish(request):
    context = {}
    if not session_valid(request):
        return script('location.href="http://" + location.host + "/login"')
    return render(request, 'mng/publish.html', context)
Пример #9
0
def setting(request):
    context = kvs()
    # print(context)
    if not session_valid(request):
        return script('location.href="http://" + location.host + "/login"')
    return render(request, "mng/setting.html", context)
Пример #10
0
def download(request):
    docs = all_files()
    context = {'docs': docs}
    if not session_valid(request):
        return script('location.href="http://" + location.host + "/login"')
    return render(request, 'mng/download.html', context)
Пример #11
0
def need_login(request):
    if not session_valid(request):
        return script('location.href="http://" + location.host + "/login"')
Пример #12
0
def key_valid(request):
    if request.POST['key'] == '*****@*****.**':
        request.session['legal'] = True
        return script('location.href="http://" + location.host')
    else:
        return login(request)
Пример #13
0
def export_html(request):
    if not session_valid(request):
        return script('location.href="http://" + location.host + "/login"')
    return render(request, 'mng/export.html', {})
Пример #14
0
def view(request, year, month, day):
    context = query_when(year, month, day)
    if not session_valid(request):
        return script('location.href="http://" + location.host + "/login"')
    return render(request, 'mng/view.html', context)