mirror of
https://git.sr.ht/~tsileo/microblog.pub
synced 2024-12-22 21:24:28 +00:00
Tweak/debug
This commit is contained in:
parent
2f25540092
commit
0c60612407
1 changed files with 5 additions and 2 deletions
7
app.py
7
app.py
|
@ -232,7 +232,7 @@ def _get_file_url(url, size, kind):
|
|||
@app.template_filter()
|
||||
def remove_mongo_id(dat):
|
||||
if "_id" in dat:
|
||||
del dat["_id"]
|
||||
dat["_id"] = str(dat["_id"])
|
||||
return dat
|
||||
|
||||
|
||||
|
@ -1531,11 +1531,14 @@ def api_undo():
|
|||
@login_required
|
||||
def admin_stream():
|
||||
q = {"meta.stream": True, "meta.deleted": False}
|
||||
inbox_data, older_than, newer_than = paginated_query(DB.activities, q)
|
||||
|
||||
tpl = "stream.html"
|
||||
if request.args.get("debug"):
|
||||
tpl = "stream_debug.html"
|
||||
if request.args.get("debug_inbox"):
|
||||
q = {}
|
||||
|
||||
inbox_data, older_than, newer_than = paginated_query(DB.activities, q)
|
||||
|
||||
return render_template(
|
||||
tpl, inbox_data=inbox_data, older_than=older_than, newer_than=newer_than
|
||||
|
|
Loading…
Reference in a new issue