Beispiel #1
0
    def context(self, request, **kwargs):
        job_id = kwargs.get('job_id', '')

        return {
            'site_commitments_string': context_tools.get_site_commitments_string(request),
            'requested_job': context_tools.get_job(request, job_id),
        }
Beispiel #2
0
    def context(self, request, **kwargs):
        job_id = kwargs.get('job_id', '')

        return {
            'site_commitments_string':
            context_tools.get_site_commitments_string(request),
            'requested_job':
            context_tools.get_job(request, job_id),
        }
Beispiel #3
0
 def context(self, request, **kwargs):
     return {
         'arranged_jobs': context_tools.get_arranged_jobs(request),
         'data_type': '',
         'default_jobs': context_tools.get_default_jobs(request),
         'featured_jobs': context_tools.get_featured_jobs(request),
         'location_term': context_tools.get_location_term(request),
         'moc_term': context_tools.get_moc_term(request),
         'query_string': context_tools.get_query_string(request),
         'results_heading': context_tools.get_results_heading(request),
         'site_commitments_string': context_tools.get_site_commitments_string(request),
         'site_config': context_tools.get_site_config(request),
         'site_tags': settings.SITE_TAGS,
         'title_term': context_tools.get_title_term(request),
     }
Beispiel #4
0
 def context(self, request, **kwargs):
     site_buid_objects = BusinessUnit.objects.filter(
         id__in=settings.SITE_BUIDS)
     return {
         'arranged_jobs':
         context_tools.get_arranged_jobs(request),
         'data_type':
         '',
         'default_jobs':
         context_tools.get_default_jobs(request),
         'featured_jobs':
         context_tools.get_featured_jobs(request),
         'location_term':
         context_tools.get_location_term(request),
         'moc_term':
         context_tools.get_moc_term(request),
         'query_string':
         context_tools.get_query_string(request),
         'results_heading':
         context_tools.get_results_heading(request),
         'site_commitments_string':
         context_tools.get_site_commitments_string(request),
         'site_config':
         context_tools.get_site_config(request),
         'site_tags':
         settings.SITE_TAGS,
         'title_term':
         context_tools.get_title_term(request),
         'analytics_info':
         json.dumps({
             'site_business_units': ([bu.title
                                      for bu in site_buid_objects]),
             'default_facet_names':
             ([df.name for df in settings.DEFAULT_FACET]),
             'featured_facet_names':
             ([ff.name for ff in settings.FEATURED_FACET])
         })
     }
Beispiel #5
0
 def context(self, request, **kwargs):
     site_buid_objects = BusinessUnit.objects.filter(id__in=settings.SITE_BUIDS)
     return {
         'arranged_jobs': context_tools.get_arranged_jobs(request),
         'data_type': '',
         'default_jobs': context_tools.get_default_jobs(request),
         'featured_jobs': context_tools.get_featured_jobs(request),
         'location_term': context_tools.get_location_term(request),
         'moc_term': context_tools.get_moc_term(request),
         'query_string': context_tools.get_query_string(request),
         'results_heading': context_tools.get_results_heading(request),
         'site_commitments_string': context_tools.get_site_commitments_string(request),
         'site_config': context_tools.get_site_config(request),
         'site_tags': settings.SITE_TAGS,
         'title_term': context_tools.get_title_term(request),
         'analytics_info': json.dumps({
             'site_business_units': ([bu.title for bu in
                                                 site_buid_objects]),
             'default_facet_names': ([df.name for df in
                                                 settings.DEFAULT_FACET]),
             'featured_facet_names': ([ff.name for ff in
                                                 settings.FEATURED_FACET])
         })
     }
 def test_get_site_commitments_string(self):
     string = context_tools.get_site_commitments_string(self.search_results_request)
     self.assertEqual(string, self.commitment.commit)
Beispiel #7
0
 def test_get_site_commitments_string(self):
     string = context_tools.get_site_commitments_string(
         self.search_results_request)
     self.assertEqual(string, self.commitment.commit)