Exemplo n.º 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)
Exemplo n.º 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)
Exemplo n.º 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)
Exemplo n.º 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)
Exemplo n.º 5
0
def need_login(request):
    if not session_valid(request):
        return script('location.href="http://" + location.host + "/login"')
Exemplo n.º 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)
Exemplo n.º 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', {})
Exemplo n.º 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)
Exemplo n.º 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)
Exemplo n.º 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)
Exemplo n.º 11
0
def need_login(request):
    if not session_valid(request):
        return script('location.href="http://" + location.host + "/login"')
Exemplo n.º 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)
Exemplo n.º 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', {})
Exemplo n.º 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)