def my_ticket(page=1): values = get_default_values() #~ values = ordered_dict_to_dict(request.args) #~ values['user_id'] = current_user.id values['status_id'] = STATUS_IN_PROGRESS values['ticket.status_id'] = STATUS_IN_PROGRESS tickets = my_tickets_view() return make_response(tickets.render(values))
def view_my_ticket(page=1): top_bar_params = get_default_values() values = ordered_dict_to_dict(request.args) values['user_id'] = current_user.id tickets = my_tickets_view() web.header.create('My Tickets', top_bar_params) web.page.create(web.header.render()) web.page.section(tickets.render(values)) web.template.body.append(web.page.render()) return make_response(web.render())
def my_tickets(page=0): user = authenticate(request.form) if user is None: return make_response(ERROR_INVALID_TOKEN) #~ data = {'user_id': '1'} #values = ordered_dict_to_dict(request.args) values = {} values['user_id'] = 1 #current_user.id tickets = my_tickets_view() result = [] for row in tickets.get_data(values): row['updated'] = str(row['updated']) result.append(row) return make_response(json.dumps({'authkey': request.form.get('authkey'), 'data': result}))