0Pricing
Flask Academy · Lesson

Blueprint-Scoped Templates and Statics

Give each blueprint its own assets.

Each Feature Owns Its Assets

A truly modular blueprint carries its own templates and static files. This keeps a feature self-contained and easy to move around.

Point to a Template Folder

When you create the blueprint, set template_folder so Flask also searches that folder when rendering this blueprint pages.

blog = Blueprint("blog", __name__,
    template_folder="templates")

All lessons in this course

  1. Why Blueprints Beat One Giant File
  2. Create and Register a Blueprint
  3. URL Prefixes and Blueprint url_for
  4. Blueprint-Scoped Templates and Statics
← Back to Flask Academy