0Pricing
Flask Academy · Lesson

The static Folder Convention

Where Flask looks for assets by default.

Assets Need a Home

Your app needs CSS, JavaScript, and images. Flask gives them one default home: a folder named static next to your app. 📁

Where Flask Looks

By convention, Flask serves anything inside the static folder automatically, so you never write a route to hand out a stylesheet yourself.

All lessons in this course

  1. The static Folder Convention
  2. Link Assets with url_for static
  3. Cache Busting with File Versions
  4. Static Files in Production Reality
← Back to Flask Academy