1

While developing the app flask-admin properly loaded the multiple stylesheets and javascript files. But once deployed the path to those files is incorrect, as well as the links to the views.

I am deploying the app at http://mydomian.com/services/. It seems that the paths are missing the "services" part.

I am configuring the flask-admin as:

admin = Admin(app, index_view=MyHomeView(), name='DB Admin', template_mode=None, static_url_path = '', endpoint='admin', url='/treatabolome_service/')

So the issues are:

  1. The stylesheets and javascript files appear as /admin/vendor/jquery.min.js?v=3.3.1 instead of /services/admin/vendor/jquery.min.js?v=3.3.1
  2. The links to the views appearsas http://mydomian.com/services//PBTable/ instead of http://mydomian.com/services/admin/PBTable/

How I have to fill the static_url_path, endpoint, and url to solve this issue?

carlesh
  • 537
  • 1
  • 4
  • 17
  • Perhaps you are looking for APPLICATION_ROOT configuration entry. This [answer](https://stackoverflow.com/a/18967744/6682517) explains how to use it. – Sergey Shubin Jul 10 '20 at 07:20

0 Answers0