forked from forks/microblog.pub
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()
|
@app.template_filter()
|
||||||
def remove_mongo_id(dat):
|
def remove_mongo_id(dat):
|
||||||
if "_id" in dat:
|
if "_id" in dat:
|
||||||
del dat["_id"]
|
dat["_id"] = str(dat["_id"])
|
||||||
return dat
|
return dat
|
||||||
|
|
||||||
|
|
||||||
|
@ -1531,11 +1531,14 @@ def api_undo():
|
||||||
@login_required
|
@login_required
|
||||||
def admin_stream():
|
def admin_stream():
|
||||||
q = {"meta.stream": True, "meta.deleted": False}
|
q = {"meta.stream": True, "meta.deleted": False}
|
||||||
inbox_data, older_than, newer_than = paginated_query(DB.activities, q)
|
|
||||||
|
|
||||||
tpl = "stream.html"
|
tpl = "stream.html"
|
||||||
if request.args.get("debug"):
|
if request.args.get("debug"):
|
||||||
tpl = "stream_debug.html"
|
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(
|
return render_template(
|
||||||
tpl, inbox_data=inbox_data, older_than=older_than, newer_than=newer_than
|
tpl, inbox_data=inbox_data, older_than=older_than, newer_than=newer_than
|
||||||
|
|
Loading…
Reference in a new issue