Beispiel #1
0
def secret_book_part_list(request,cur_page=1,template="admin/card/secret_book_part/list.tpl"):  
    count = Card.get_card_count("SecretBookPart")
    if count != 0:
        page = int(cur_page)
        secret_book_part_list = Card.get_card_list("SecretBookPart",page)
        p = Paginator(page,count,page_size=config.default_page_size)
        if secret_book_part_list:
            return render_response(template,request=request,secret_book_part_list=secret_book_part_list,p=p)
    return render_response(template,request=None,secret_book_part_list=None,p=None)
Beispiel #2
0
def treasure_part_list(request,cur_page=1,template="admin/card/treasure_part/list.tpl"):  
    count = Card.get_card_count("TreasurePart")
    if count != 0:
        page = int(cur_page)
        treasure_part_list = Card.get_card_list("TreasurePart",page)
        p = Paginator(page,count,page_size=config.default_page_size)
        if treasure_part_list:
            return render_response(template,request=request,treasure_part_list=treasure_part_list,p=p)
    return render_response(template,request=None,treasure_part_list=None,p=None)
Beispiel #3
0
def shield_list(request,cur_page=1,template="admin/card/shield/list.tpl"):  
    count = Card.get_card_count("Shield")
    if count != 0:
        page = int(cur_page)
        shield_list = Card.get_card_list("Shield",page)
        p = Paginator(page,count,page_size=config.default_page_size)
        if shield_list:
            return render_response(template,request=request,shield_list=shield_list,p=p)
    return render_response(template,request=None,shield_list=None,p=None)
Beispiel #4
0
def general_list(request,cur_page=1,template="admin/card/general/list.tpl"):  
    count = Card.get_card_count("General")
    if count != 0:
        page = int(cur_page)
        general_list = Card.get_card_list("General",page)
        p = Paginator(page,count,page_size=config.default_page_size)
        if general_list:
            return render_response(template,request=request,general_list=general_list,p=p)
    return render_response(template,request=None,general_list=None,p=None)
Beispiel #5
0
def weapon_list(request,cur_page=1,template="admin/card/weapon/list.tpl"):  
    count = Card.get_card_count("Weapon")
    if count != 0:
        page = int(cur_page)
        weapon_list = Card.get_card_list("Weapon",page)
        p = Paginator(page,count,page_size=config.default_page_size)
        if weapon_list:
            return render_response(template,request=request,weapon_list=weapon_list,p=p)
    return render_response(template,request=None,weapon_list=None,p=None)