Add UI Method to check if the current URL path matches a link href

This commit is contained in:
Andrew Croce 2018-07-20 08:23:01 -04:00
parent d84a38eb13
commit 305877d953
2 changed files with 4 additions and 0 deletions

View File

@ -16,6 +16,7 @@ from atst.home import home
from atst.api_client import ApiClient
from atst.sessions import RedisSessions
from atst import ui_modules
from atst import ui_methods
ENV = os.getenv("TORNADO_ENV", "dev")
@ -101,6 +102,7 @@ def make_app(config, deps, **kwargs):
cookie_secret=config["default"]["COOKIE_SECRET"],
debug=config["default"].getboolean("DEBUG"),
ui_modules=ui_modules,
ui_methods=ui_methods,
**kwargs,
)
app.config = config

2
atst/ui_methods.py Normal file
View File

@ -0,0 +1,2 @@
def matchesPath(self, href):
return self.request.uri.startswith(href)