diff options
author | rubenwardy <rw@rubenwardy.com> | 2020-03-28 19:01:39 +0000 |
---|---|---|
committer | rubenwardy <rw@rubenwardy.com> | 2020-03-28 19:01:39 +0000 |
commit | 663a9ba07bb947857d4fefecbebf1eadbadafe9e (patch) | |
tree | aaa7c2eab583a02d5553d23791a3c1b6d0129c81 /app/utils.py | |
parent | 144ae69f5c8177ea9d09d7084a81dbf4c2db3302 (diff) | |
download | cheatdb-663a9ba07bb947857d4fefecbebf1eadbadafe9e.tar.xz |
Fix exposing abs_url_for to templates
Diffstat (limited to 'app/utils.py')
-rw-r--r-- | app/utils.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/app/utils.py b/app/utils.py index 712339b..727b5b5 100644 --- a/app/utils.py +++ b/app/utils.py @@ -18,12 +18,10 @@ from flask import request, flash, abort, redirect from flask_user import * from flask_login import login_user, logout_user -from app.models import * -from app import app +from .models import * +from . import app import random, string, os, imghdr - -@app.template_filter() def abs_url_for(path, **kwargs): scheme = "https" if app.config["BASE_URL"][:5] == "https" else "http" return url_for(path, _external=True, _scheme=scheme, **kwargs) |