Debug, search fixes

This commit is contained in:
Andrew Godwin 2023-05-05 23:30:59 -07:00
parent eeee385a61
commit 930aab384e
3 changed files with 6 additions and 6 deletions

View File

@ -127,7 +127,9 @@ class SearchService:
""" """
Searches for posts on an identity via full text search Searches for posts on an identity via full text search
""" """
return self.identity.posts.filter(content__search=self.query)[:50] return self.identity.posts.unlisted(include_replies=True).filter(
content__search=self.query
)[:50]
def search_all(self): def search_all(self):
""" """

View File

@ -56,7 +56,8 @@ class JsonViewer(FormView):
except json.JSONDecodeError as ex: except json.JSONDecodeError as ex:
result = str(ex) result = str(ex)
else: else:
result = json.dumps(document, indent=4, sort_keys=True) context["raw_result"] = json.dumps(response.json(), indent=2)
result = json.dumps(document, indent=2, sort_keys=True)
# result = pprint.pformat(document) # result = pprint.pformat(document)
context["result"] = result context["result"] = result
return self.render_to_response(context) return self.render_to_response(context)

View File

@ -56,10 +56,7 @@
else set my.innerText to 'Hide' else set my.innerText to 'Hide'
">Show</a></span> ">Show</a></span>
</div> </div>
<div id="raw_response" class="hidden"> <pre id="raw_response" class="hidden">{{ raw_result }}</pre>
{{ raw_result|escape }}
</div>
<div class="field payload"> <div class="field payload">
<span class="name">Canonical: <span class="name">Canonical: