flask make:controller#

Intro To Flask Make Controller Unwatched

When it makes sense to start from controller behavior and how make:controller helps scaffold the layer that coordinates routes, templates, and models.

This video slot is planned for the series. Once a YouTube video is linked, it will expand and play directly on this page.

flask make:controller is the quickest way to scaffold controller behavior for a resource when you already know the application logic belongs at the controller layer.

At its simplest, it creates a controller class. But it can also generate RESTful actions, routes, templates for the GET actions, and even the model when you want the surrounding structure built with it.

That makes it useful in two very common situations:

  • you already know the resource behavior you want and want the controller first

  • you want all seven RESTful actions scaffolded without creating each one by hand

The bigger takeaway is that make:controller is not only about controller files. It is a strong starting point when you are thinking from application behavior outward.

Everything in these sections builds on itself one step at a time.