def mainpage(request): context=RequestContext(request) king=getking() queen=getqueen() king.initface() queen.initface() return render_to_response('index.html',{'king':king,'queen':queen},context)
def fault_list(request): context=RequestContext(request) if request.method=='GET': if request.user.is_authenticated(): faults=getfaults() king=getking() queen=getqueen() return render_to_response('fault_list.html',{'faults':faults,'request':request,'king':king,'queen':queen,'cardsofking':getcards(king.user),'cardsofqueen':getcards(queen.user)},context) else: return render_to_response('index.html',{'error':'Please Login First!','king':getking(),'queen':getqueen()},context)
def notice_advice(request): if request.method == 'POST': newnotice(getking().user,request.POST.get('content')) return HttpResponseRedirect('/notice/success/')
def law(request): context=RequestContext(request) if request.method=='GET': if request.user.is_authenticated(): clauselist=getclauses() return render_to_response('law.html',{'error':'','request':request,'clauselist':clauselist},context) else: return render_to_response('index.html',{'error':'Please Login First!','king':getking(),'queen':getqueen()},context)
def clause_audit(request): context=RequestContext(request) if request.method=='GET': if request.user.is_authenticated(): user=request.user al=getauditing(user) return render_to_response('clause_audit.html',{'auditlist':al,'other':getcounterpart(user),'faultlist':getconfirming(user),'deletelist':getdeleting(user),'request':request},context) else: return render_to_response('index.html',{'error':'Please Login First!','king':getking(),'queen':getqueen()},context)