Search code examples
flaskbootstrap-studio

Change Flask static folder name to "assets"


I am using app "Bootstrap Studio" to build my html,css. it always generating the static folder as "assets".

also am using FLASK, which always search for static folder as "static". and it is kinda hard to keep renaming the assets folder to be "static".. so gently . is it possible to change static folder name to : 'assets' in FLASK. ? to be something like this :

run.py
WebFiles/
    index.html
    assets/
          css/
             styles.css
          js/
             main.js

Solution

  • You can instantiate your app via Flask(static_folder="assets")

    Also see https://flask.palletsprojects.com/en/1.1.x/api/