Esempio n. 1
0
def create_event_page_handler():
    print 'In create event page'
    userController = UserController()
    user = userController.get_item(session['email']) if 'email' in session else None
    spaceController = SpaceController()
    spaces = spaceController.get_items()
    return render_template("create_event.html", user=user, spaces=spaces)
Esempio n. 2
0
def grind():
    print 'In grind page'
    controller = SpaceController()
    spaces = controller.get_items()
    userController = UserController()
    user = userController.get_item(session['email']) if 'email' in session else None
    deals_list = HubspotAPI().get_deals()
    deals = []
    for deal in deals_list:
        deals.append({'id':deal["dealId"],'name':deal["properties"]["dealname"]["value"]})
    deal_stages = ['appointmentscheduled','qualifiedtobuy','presentationscheduled','decisionmakerboughtin','contractsent','closedwon','closedlost']
    return render_template("grind.html", spaces=spaces, user=user, deals=deals, deal_stages=deal_stages)
Esempio n. 3
0
def get_spaces():
    controller = SpaceController()
    spaces_res = controller.get_items()
    spaces = [{'id':space['space_id'],'name':space['name'],'address':space['address'],'city':space['city'],'state':space['state'],'zip':space['zip'],'phone':space['phone']} for space in spaces_res]
    return json.dumps({'spaces': spaces})