2021-08-11 17:01:19 +00:00
|
|
|
from files.__main__ import app
|
2021-08-13 02:35:17 +00:00
|
|
|
from .get import *
|
2021-07-21 01:12:26 +00:00
|
|
|
|
|
|
|
|
|
|
|
@app.template_filter("full_link")
|
|
|
|
def full_link(url):
|
|
|
|
|
|
|
|
return f"https://{app.config['SERVER_NAME']}{url}"
|
|
|
|
|
|
|
|
|
|
|
|
@app.template_filter("app_config")
|
|
|
|
def app_config(x):
|
2021-08-13 02:35:17 +00:00
|
|
|
return app.config.get(x)
|
|
|
|
|
|
|
|
@app.template_filter("post_embed")
|
|
|
|
def crosspost_embed(id):
|
|
|
|
|
2021-08-13 02:37:04 +00:00
|
|
|
id = int(id)
|
|
|
|
|
2021-08-13 02:37:56 +00:00
|
|
|
p = get_post(id, graceful=True)
|
2021-08-13 02:48:33 +00:00
|
|
|
|
2021-08-13 02:52:37 +00:00
|
|
|
return render_template("submission_listing.html", listing=[p], postembed=True)
|