def index(): """ This is the display view. """ # Create a page for each event - pass event ID as variable in querystring # Get the event details event = eventbrite.get_event(EVENTBRITE_EVENT_ID) # Get the attendee list # cur = g.db.execute('select name, attendee_id, entries from raffle order by name asc') # attendees = [dict(name=row[0], attendee_id=row[1], entries=row[2]) for row in cur.fetchall()] checked_attendees = [] attendees = eventbrite.get_event_attendees(EVENTBRITE_EVENT_ID) current_page = attendees["pagination"]["page_number"] last_page = attendees["pagination"]["page_count"] while current_page <= last_page: # Lowercase all names for each_attendee in attendees["attendees"]: if (each_attendee["checked_in"]): each_attendee["profile"]["name"] = each_attendee["profile"]["name"].lower() checked_attendees.append(each_attendee) args["page"] = current_page + 1 attendees = eventbrite.get_event_attendees(EVENTBRITE_EVENT_ID, **args) current_page = attendees["pagination"]["page_number"] last_page = attendees["pagination"]["page_count"] print checked_attendees # Reverse so latest to sign up is at the top #sorted(student_objects, key=lambda student: student.age) checked_attendees.sort() # display_attendees = sorted(attendees, ) # attendee.profile.name # Print out a list of all attendees with a plus and minus button for each one # Render our HTML.https://slack-files.com/files-tmb/T047XS613-F08U4VCGM-81e9dc4e45/slack_for_ios_upload_1024.jpg return render_template( 'index.html', winner=False, event=event, attendees=checked_attendees )
def index(): """ This is the display view. """ # Get the event details event = eventbrite.get_event(EVENTBRITE_EVENT_ID) # Get the attendee list attendees = eventbrite.get_event_attendees(EVENTBRITE_EVENT_ID) # Reverse so latest to sign up is at the top attendees["attendees"].reverse() # Render our HTML. return render_template("index.html", settings={"PUSHER_KEY": PUSHER_KEY}, event=event, attendees=attendees)
def index(): """ This is the display view. """ # Create a page for each event - pass event ID as variable in querystring # Get the event details event = eventbrite.get_event(EVENTBRITE_EVENT_ID) # Get the attendee list # cur = g.db.execute('select name, attendee_id, entries from raffle order by name asc') # attendees = [dict(name=row[0], attendee_id=row[1], entries=row[2]) for row in cur.fetchall()] checked_attendees = [] attendees = eventbrite.get_event_attendees(EVENTBRITE_EVENT_ID) current_page = attendees["pagination"]["page_number"] last_page = attendees["pagination"]["page_count"] while current_page <= last_page: # Lowercase all names for each_attendee in attendees["attendees"]: if (each_attendee["checked_in"]): each_attendee["profile"]["name"] = each_attendee["profile"][ "name"].lower() checked_attendees.append(each_attendee) args["page"] = current_page + 1 attendees = eventbrite.get_event_attendees(EVENTBRITE_EVENT_ID, **args) current_page = attendees["pagination"]["page_number"] last_page = attendees["pagination"]["page_count"] print checked_attendees # Reverse so latest to sign up is at the top #sorted(student_objects, key=lambda student: student.age) checked_attendees.sort() # display_attendees = sorted(attendees, ) # attendee.profile.name # Print out a list of all attendees with a plus and minus button for each one # Render our HTML.https://slack-files.com/files-tmb/T047XS613-F08U4VCGM-81e9dc4e45/slack_for_ios_upload_1024.jpg return render_template('index.html', winner=False, event=event, attendees=checked_attendees)
def index(): #Initial view # Get the event details event = eventbrite.get_event(EVENTBRITE_EVENT_ID) # Get the attendee list attendees = eventbrite.get_event_attendees(EVENTBRITE_EVENT_ID) attendees2 = test.get_all_event_attendees(EVENTBRITE_EVENT_ID) # Reverse so latest to sign up is at the top attendees['attendees'].reverse() #attendees2['attendees'].reverse() return render_template( 'index.html', settings={'PUSHER_KEY': PUSHER_KEY}, event=event, attendees=attendees2 )
def index(): """ This is the display view. """ # Get the event details event = eventbrite.get_event(EVENTBRITE_EVENT_ID, expand='ticket_classes') # Get the attendee list attendees = eventbrite.get_event_attendees(EVENTBRITE_EVENT_ID) # Reverse so latest to sign up is at the top attendees['attendees'].reverse() ticketClasses = eventbrite.get('/events/' + EVENTBRITE_EVENT_ID + '/ticket_classes/') # Render our HTML. return render_template( 'index.html', settings={'PUSHER_KEY': PUSHER_KEY}, event=event, attendees=attendees )