def get_context(self, request): context = super(SearchLandingPage, self).get_context(request) context['search_url'] = self.get_search_url() context['course_finder_url'] = get_page_for_language( self.get_language(), CourseFinderChooseCountry.objects.all()).url context['institutions_list'] = InstitutionList.get_options()[ self.get_language()] return context
def get_context(self, request): context = super().get_context(request) context['page'] = self context['english_url'] = self.get_english_url() context['welsh_url'] = self.get_welsh_url() context['cookies_accepted'] = request.COOKIES.get('discoverUniCookies') context['load_error'] = request.GET.get('load_error', '') context['error_type'] = request.GET.get('error_type', '') context['institutions_list'] = InstitutionList.get_options()[self.get_language()] return context
def get_context(self, request): context = super().get_context(request) language = self.get_language() context['institutions_list'] = InstitutionList.get_options()[language] context['language'] = language context['search_info'] = { 'institutions': "", 'number_options_selected': translations.term_for_key('number_options_selected', language), 'institution_name': translations.term_for_key('institution_name', language), 'select_all_results': translations.term_for_key('select_all_results', language), 'select_all_institutions': translations.term_for_key('select_all_institutions', language) } return context
def show_has_no_bookmarked_courses(request, language): # print("OPTIONS::: ", InstitutionList.get_options()[utils.get_language(request.get_full_path())]) context = dict( institutions_list=InstitutionList.get_options()[language], search_info={ 'institutions': "", 'number_options_selected': translations.term_for_key('number_options_selected', language), 'institution_name': translations.term_for_key('institution_name', language), 'select_all_results': translations.term_for_key('select_all_results', language), 'select_all_institutions': translations.term_for_key('select_all_institutions', language) } ) return render_with_language_context( request=request, template='courses/comparison/has_no_saved_courses.html', context=context, language=language, status=206 )
def get_context(self, request): context = super().get_context(request) context['institutions_list'] = InstitutionList.get_options()[ self.get_language()] return context