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 })
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 })
def memory(request): userid = request.session['userid'] u = user().get_user_by_id(userid) return render_mako_context(request, 'admin/memory.html', {'users': u})
def admin_test(request): return render_mako_context(request, 'admin/test/include.html', {'title': 'include.html'})
def disk(request): userid = request.session['userid'] u = user().get_user_by_id(userid) return render_mako_context(request, 'admin/disk.html', {'users': u})