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
"""
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):
"""

View File

@ -56,7 +56,8 @@ class JsonViewer(FormView):
except json.JSONDecodeError as ex:
result = str(ex)
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)
context["result"] = result
return self.render_to_response(context)

View File

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