I'm developing a flask app. i have assets folder containing files, fonts, images and javascript where should I put them? i put index.html in templates. I have tried them putting in static folder but it didn't work.
            Asked
            
        
        
            Active
            
        
            Viewed 950 times
        
    1 Answers
1
            
            
        I would suggest organizing your directory structure as such:
myapp/
    __init__.py
    static/
    templates/
    views/
    models.py
run.py
Then you can organize your static folder based on personal preference. For example, something such as:
static/
    css/
        lib/
            bootstrap.css
        style.css
        home.css
        admin.css
    js/
        lib/
            jquery.js
        home.js
        admin.js
    img/
        logo.svg
        favicon.ico
By default flask will look for static content in the static folder relative to where the application is initialized and started. For more info about static files check out this link
Hopefully that helps!
 
    
    
        Nathan
        
- 7,853
- 4
- 27
- 50
