Exemplo n.º 1
0
def pricing_section(section_no):
    print('pricing_section', section_no)
    username = login_check()
    #print(len(username))
    if (username is None):
        redirect()

    index_costs = bottle.request.forms.get('index_costs')
    if not index_costs:
        index_costs = ""

    pricing1 = Pricing_procedure()
    #username = username + '_pricing'
    # check if the pricing template has been generated
    # if not generate the pricing in list
    print('check')
    if  not pricing1.check_pricing_exist(username):
        pricelist1 = pricing1.set_pricing(username)
        print ('check', pricelist1)
    #section_no = 1
    pricelist2 = pricing1.get_pricing(section_no, username)
    print ('p2  for sections', pricelist2)

    return template('pricing', pricelist=pricelist2, section_no=section_no, username=username)