We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 66a940b commit 7196819Copy full SHA for 7196819
rest_framework_docs/views.py
@@ -15,5 +15,12 @@ def get_context_data(self, **kwargs):
15
16
context = super(DRFDocsView, self).get_context_data(**kwargs)
17
docs = ApiDocumentation()
18
- context['endpoints'] = docs.get_endpoints()
+ endpoints = docs.get_endpoints()
19
+
20
+ query = self.request.GET.get("q", None)
21
+ if query and endpoints:
22
+ endpoints = [endpoint for endpoint in endpoints if query in endpoint.path]
23
24
+ context['query'] = query
25
+ context['endpoints'] = endpoints
26
return context
0 commit comments