mirror of
https://github.com/jointakahe/takahe.git
synced 2024-11-14 03:11:46 +00:00
Debug, search fixes
This commit is contained in:
parent
eeee385a61
commit
930aab384e
3 changed files with 6 additions and 6 deletions
|
@ -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):
|
||||
"""
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue