MCPcopy Index your code
hub / github.com/aboutcode-org/vulnerablecode / get_context_data

Method get_context_data

vulnerabilities/views.py:148–153  ·  view source on GitHub ↗
(self, **kwargs)

Source from the content-addressed store, hash-verified

146 paginate_by = PAGE_SIZE
147
148 def get_context_data(self, **kwargs):
149 context = super().get_context_data(**kwargs)
150 request_query = self.request.GET
151 context["vulnerability_search_form"] = VulnerabilitySearchForm(request_query)
152 context["search"] = request_query.get("search")
153 return context
154
155 def get_queryset(self, query=None):
156 query = query or self.request.GET.get("search") or ""

Callers

nothing calls this directly

Calls 3

get_context_dataMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected