15.3 Anatomy of the App
The flatpages app is like any other Django app—it doesn’t magically allow for the creation of webpages without a database. In fact, the webpages created by the app are actually instances of the FlatPage model class. Flatpages are full webpages that are stored in the database.
For the flatpages app to create the illusion of a static page, the app supplies a view to display FlatPage instances in. The app also supplies a URL configuration for developers to include in the root URL configuration. Perhaps surprisingly, the app also provides a form to create FlatPages, which is mainly used by the admin app (which we’ll see in Chapter 23: The Admin Library).
The app also provides middleware. Originally, the app used the middleware ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access