def get_context_data(self, **kwargs): api = expaApi.ExpaApi() context = super(GetMatchableEPs, self).get_context_data(**kwargs) eps = api.get_matchable_EPs(1395)['eps'] eps = tools.set_program(eps) context['personas'] = eps context['header'] = 'AIESEC Andes EP Search Tool' return context
def get_context_data(self, **kwargs): api = expaApi.ExpaApi() context = super(GetUncontactedEPs, self).get_context_data(**kwargs) try: office_name = self.kwargs['office_name'] except KeyError: office_name = 'ANDES' context['office_name'] = office_name office = Office.objects.select_related('superoffice', 'superoffice__superoffice').get(name=office_name.replace('_', ' ')) officeID = office.expaID eps = api.getUncontactedEPs(officeID)['eps'] eps = tools.set_program(eps) context['personas'] = eps context['header'] = 'Uncontacted EPs' return context
def get_context_data(self, **kwargs): api = expaApi.ExpaApi() context = super(GetUncontactedEPs, self).get_context_data(**kwargs) try: office_name = self.kwargs['office_name'] except KeyError: office_name = 'ANDES' context['office_name'] = office_name office = Office.objects.select_related( 'superoffice', 'superoffice__superoffice').get(name=office_name.replace('_', ' ')) officeID = office.expaID eps = api.getUncontactedEPs(officeID)['eps'] eps = tools.set_program(eps) context['personas'] = eps context['header'] = 'Uncontacted EPs' return context
def get_context_data(self, **kwargs): api = expaApi.ExpaApi() context = super(GetMatchableEPs, self).get_context_data(**kwargs) try: office_name = self.kwargs['office_name'] except KeyError: office_name = 'ANDES' office = Office.objects.get(name=office_name.replace('_', ' ')) officeID = office.expaID context['office_name'] = office_name eps = api.get_matchable_EPs(officeID)['eps'] print eps print "TEST" eps = tools.set_program(eps) context['personas'] = eps context['header'] = 'AIESEC %s EP Search Tool' % office_name return context