python - Have Flask-AutoIndex serve the children of the app directory but not "/" itself -


i have flask application , want serve files in subdirectories of folder flask application resides. tried doing flask-autoindex so:

autoindex(app, browse_root=os.path.curdir )  @app.route('/') def index():     return render_template('index.html'); 

this serves static content out of /css , /js nicely, can't / route index function. instead, autoindex routes / , displays files, including application source code file. tried setting add_url_rules false allowed index route / but/css , /js no longer served.

how can have subdirectories of application autoindexed still allow application handle /?


Comments

Popular posts from this blog

ruby on rails - RuntimeError: Circular dependency detected while autoloading constant - ActiveAdmin.register Role -

c++ - OpenMP unpredictable overhead -

javascript - Wordpress slider, not displayed 100% width -