Returns the context data to provide to the template.
550519
def get_context_data(self, **kwargs):
        
        context = super().get_context_data(**kwargs)

        # Computes the number of topics added by the considered member
        context['topics_count'] = (
            Topic.objects.filter(approved=True, poster=self.object.user).count()
        )

        # Fetches the recent posts added by the considered user
        forums = self.request.forum_permission_handler.get_readable_forums(
            Forum.objects.all(), self.request.user,
        )
        recent_posts = (
            Post.approved_objects
            .select_related('topic', 'topic__forum')
            .filter(topic__forum__in=forums, poster=self.object.user)
            .order_by('-created')
        )
        context['recent_posts'] = recent_posts[:machina_settings.PROFILE_RECENT_POSTS_NUMBER]

        return context
434584
def get_context_data(self, **kwargs):
        
        context = super(CapabilityView, self).get_context_data(**kwargs)
        context.update({'protocol': PROTOCOL,
                        'copyright': COPYRIGHT,
                        'feeds_format': FEEDS_FORMAT,
                        'site': Site.objects.get_current()})
        return context
1125253
public Map<String, Object> getContextData() {
        if (ivContextData == null) {
            ivContextData = new HashMap<String, Object>();

            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                Tr.debug(tc, "getContextData: created empty");
        }

        return ivContextData;
    }
479903
def get_context(self):
        
        if not self.context:
            return
        else:
            assert isinstance(self.context, tuple), 'Expected a Tuple not {0}'.format(type(self.context))
        for model in self.context:
            model_cls = utils.get_model_class(model)
            key = utils.camel_to_snake(model_cls.__name__)
            self.context_data[key] = self.get_instance_of(model_cls)
900130
def get_context(self, **kwargs):
        
        context = self.get_context_data(form=self.form_obj, **kwargs)
        context.update(super(FormAdminView, self).get_context())
        return context
1248590
def data_context_name(fn):
    
    return os.path.join(os.path.dirname(__file__), "template_data", fn)
1054826
def get_context_data(self, **kwargs):
        
        for key in self.get_form_class_keys():
            kwargs['{}_form'.format(key)] = self.get_form(key)
        return super(FormMixin, self).get_context_data(**kwargs)
852898
def get_context_data(self, **kwargs):
        """"""
        
        context = super(BreedingList, self).get_context_data(**kwargs)
        context['breeding_type'] = "Active" 
        return context
705295
def get_context_data(self, **kwargs):
        """"""
        context = super(ScheduleXmlView, self).get_context_data(**kwargs)
        if self.request.GET.get('render_description', None) == '1':
            context['render_description'] = True
        else:
            context['render_description'] = False
        return context
1116370
def get_context_data(self, **kwargs):
        """"""
        
        context = super(StrainList, self).get_context_data(**kwargs)
        context['strain_list_alive'] = Strain.objects.filter(animal__Alive=True).annotate(alive=Count('animal'))
        context['cages'] = Animal.objects.filter(Alive=True).values("Cage")        
        return context
650349
def get_context_data(self, **kwargs):
        
        #noinspection PyUnresolvedReferences
        query_str           = self.request.GET.get('q', None)
        queryset            = kwargs.pop('object_list', self.object_list)
        context_object_name = self.get_context_object_name(queryset)

        # Build the context dictionary.
        context = {
            'ordering':     self.get_ordering(),
            'query_string': query_str,
            'is_searching': bool(query_str),
        }

        # Add extra variables to context for non-AJAX requests.
        #noinspection PyUnresolvedReferences
        if not self.request.is_ajax() or kwargs.get('force_search', False):
            context.update({
                'search_form':  self.get_search_form(),
                'popular_tags': self.model.popular_tags()
            })

        if context_object_name is not None:
            context[context_object_name] = queryset

        # Update context with any additional keyword arguments.
        context.update(kwargs)

        return super(IndexView, self).get_context_data(**context)
667699
def get_template_context(src, container="div", classes="", inner_classes="", alt="", background_image=False, no_css=False, aria_hidden=False):
    """"""
    context = {
        "container": container,
        "classes": classes,
        "aspect_padding_bottom": aspect_ratio_percent(src),
        "alt": alt,
        "background_image": background_image,
        "no_css": no_css,
        "inner_classes": inner_classes,
        "aria_hidden": aria_hidden,
    }

    # We can't do any of the srcset (or JS switching fallback) if we don't
    # have a thumbnail library installed.
    if not get_thumbnail_engine():
        context["image"] = src
        return context

    sizes = get_image_sizes(src)
    context["image_sizes"] = sizes

    # Set the first image in the list as the one to be rendered initially
    # (pre-JS-fallback). `if sizes` might not be a necessary check...
    context["image"] = sizes[0]

    context["image_sizes_json"] = json.dumps(sizes)
    srcset_items = ["{} {}w".format(size["url"], size["width"]) for size in sizes]

    context["image_sizes_srcset"] = ", ".join(srcset_items)
    return context
978478
def get_context_data(self, **kwargs):
        
        context = super(FilterFormMixin, self).get_context_data(**kwargs)
        context[self.context_filterform_name] = self.get_filter()
        return context
641215
def context(self):
        
        ret = libxml2mod.xmlXPathParserGetContext(self._o)
        if ret is None:raise xpathError('xmlXPathParserGetContext() failed')
        __tmp = xpathContext(_obj=ret)
        return __tmp
549126
def get_context_data(self, **kwargs):
        
        context = super(BaseAuthorDetail, self).get_context_data(**kwargs)
        context['author'] = self.author
        return context
837041
def get_context(self):
        "  "
        return {
                'content_type_name' : str(self.name),
                'content_type_verbose_name' : self.verbose_name,
                'content_type_verbose_name_plural' : self.verbose_name_plural,
                'object' : self.obj,
                'box' : self,
        }
1157884
public Context getContext() {
		if (context == null) {
			context = Model.getSingleton().getSession().getContext(this.contextId);
		}
		return context;
	}