Fix exposing abs_url_for to templates
This commit is contained in:
@@ -1,10 +1,16 @@
|
||||
from . import app
|
||||
from .utils import abs_url_for
|
||||
from urllib.parse import urlparse
|
||||
|
||||
@app.context_processor
|
||||
def inject_debug():
|
||||
return dict(debug=app.debug)
|
||||
|
||||
|
||||
@app.context_processor
|
||||
def inject_functions():
|
||||
return dict(abs_url_for=abs_url_for)
|
||||
|
||||
@app.template_filter()
|
||||
def throw(err):
|
||||
raise Exception(err)
|
||||
|
||||
Reference in New Issue
Block a user