示例#1
0
def admin_index(request):
    userid = request.session['userid']
    warning = warn()
    recv = receive()
    all = warning.get_warn_count_by_status()
    deal = warning.get_warn_count_by_status(status=1)  # 1:已处理,0 :未处理
    untreate = warning.get_warn_count_by_status(status=0)
    rundays = recv.get_run_days()
    return render_mako_context('/admin', 'admin/index.html', {
        'users': user().get_user_by_id(userid),
        'all': all,
        'deal': deal,
        'untreate': untreate,
        'rundays': rundays
    })
示例#2
0
def admin_index(request):
    userid = request.session['userid']
    warning = warn()
    recv = receive()
    all = warning.get_warn_count_by_status()
    deal = warning.get_warn_count_by_status(status=1)  # 1:已处理,0 :未处理
    untreate = warning.get_warn_count_by_status(status=0)
    rundays = recv.get_run_days()
    return render_mako_context(
        '/admin', 'admin/index.html', {
            'users': user().get_user_by_id(userid),
            'all': all,
            'deal': deal,
            'untreate': untreate,
            'rundays': rundays
        })
示例#3
0
def memory(request):
    userid = request.session['userid']
    u = user().get_user_by_id(userid)
    return render_mako_context(request, 'admin/memory.html', {'users': u})
示例#4
0
def admin_test(request):
    return render_mako_context(request, 'admin/test/include.html',
                               {'title': 'include.html'})
示例#5
0
def disk(request):
    userid = request.session['userid']
    u = user().get_user_by_id(userid)
    return render_mako_context(request, 'admin/disk.html', {'users': u})
示例#6
0
def admin_test(request):
    return render_mako_context(request, 'admin/test/include.html', {'title': 'include.html'})