Add UI Method to check if the current URL path matches a link href
This commit is contained in:
parent
d84a38eb13
commit
305877d953
@ -16,6 +16,7 @@ from atst.home import home
|
|||||||
from atst.api_client import ApiClient
|
from atst.api_client import ApiClient
|
||||||
from atst.sessions import RedisSessions
|
from atst.sessions import RedisSessions
|
||||||
from atst import ui_modules
|
from atst import ui_modules
|
||||||
|
from atst import ui_methods
|
||||||
|
|
||||||
ENV = os.getenv("TORNADO_ENV", "dev")
|
ENV = os.getenv("TORNADO_ENV", "dev")
|
||||||
|
|
||||||
@ -101,6 +102,7 @@ def make_app(config, deps, **kwargs):
|
|||||||
cookie_secret=config["default"]["COOKIE_SECRET"],
|
cookie_secret=config["default"]["COOKIE_SECRET"],
|
||||||
debug=config["default"].getboolean("DEBUG"),
|
debug=config["default"].getboolean("DEBUG"),
|
||||||
ui_modules=ui_modules,
|
ui_modules=ui_modules,
|
||||||
|
ui_methods=ui_methods,
|
||||||
**kwargs,
|
**kwargs,
|
||||||
)
|
)
|
||||||
app.config = config
|
app.config = config
|
||||||
|
2
atst/ui_methods.py
Normal file
2
atst/ui_methods.py
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
def matchesPath(self, href):
|
||||||
|
return self.request.uri.startswith(href)
|
Loading…
x
Reference in New Issue
Block a user