Пример #1
0
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)
Пример #2
0
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)
Пример #3
0
def notice_advice(request):
    if request.method == 'POST':
        newnotice(getking().user,request.POST.get('content'))
        return HttpResponseRedirect('/notice/success/')
Пример #4
0
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)
Пример #5
0
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)