mirror of
https://github.com/jointakahe/takahe.git
synced 2024-11-22 07:10:59 +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
|
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):
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -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)
|
||||||
|
|
|
@ -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:
|
||||||
|
|
Loading…
Reference in a new issue