You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
By setting APPLICATION_ROOT variable, the builder should expose all resources under the given root subpath. This is particularly convenient when running the app under reverse proxy. For instance if you need to run the app under: "mzdomain.com/myapp/", by setting APPLICATION_ROOT = "/myapp" should return all resources with that prefix.
Describe the actual results
APPLICATION_ROOT doesn't have any effect on this and urls are given in different ways in views, widgets etc...
The text was updated successfully, but these errors were encountered:
I actually would like to start a PR, but how do I set up the dev environment? looks like pip req files are not there anymore. Should I use setup.py develop?
I am pretty sure this will impact most of the views and templates (i noticed url_from from flask is called directly in the templates many times) in principle in most of the get_url(_for)... the prefix should be added, or another method could be added to substitute url_for used here and there.
I am doing this in a project but we probably don't cover all the spots.
For now what we are doing is the following (not nice but it works):
class AppBuilder(...):
@property
def url_prefix(self):
return self.app.config['APPLICATION_ROOT'] or ""
@property
def get_url_for_login(self):
return **self.url_prefix** + url_for('%s.%s' % (self.sm.auth_view.endpoint, 'login'))
Environment
Flask-Appbuilder version:
latest
Describe the expected results
By setting
APPLICATION_ROOT
variable, the builder should expose all resources under the given root subpath. This is particularly convenient when running the app under reverse proxy. For instance if you need to run the app under: "mzdomain.com/myapp/", by settingAPPLICATION_ROOT = "/myapp"
should return all resources with that prefix.Describe the actual results
APPLICATION_ROOT
doesn't have any effect on this and urls are given in different ways in views, widgets etc...The text was updated successfully, but these errors were encountered: