forked from rDrama/rDrama
fddf
parent
bbb7046a76
commit
507b742b97
|
@ -13,12 +13,11 @@ def app_config(x):
|
||||||
return app.config.get(x)
|
return app.config.get(x)
|
||||||
|
|
||||||
@app.template_filter("post_embed")
|
@app.template_filter("post_embed")
|
||||||
def post_embed(id):
|
def post_embed(id, v):
|
||||||
|
|
||||||
try: id = int(id)
|
try: id = int(id)
|
||||||
except: return None
|
except: return None
|
||||||
|
|
||||||
p = get_post(id, graceful=True)
|
p = get_post(id, graceful=True)
|
||||||
|
|
||||||
if hasattr(g, 'v') and g.v: return render_template("submission_listing.html", listing=[p], v=g.v)
|
return render_template("submission_listing.html", listing=[p], v=v)
|
||||||
else: return render_template("submission_listing.html", listing=[p], postembed=True)
|
|
|
@ -308,7 +308,7 @@
|
||||||
<div class="row no-gutters">
|
<div class="row no-gutters">
|
||||||
<div id="frontpage" class="col-12 pt-0">
|
<div id="frontpage" class="col-12 pt-0">
|
||||||
<div class="posts" id="posts">
|
<div class="posts" id="posts">
|
||||||
{{ p.embed_url | post_embed | safe }}
|
{{ p.embed_url | post_embed(v) | safe }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue