In this chapter, we will build an administrative dashboard for our website. Our admin dashboard will give certain, selected, users the ability to manage all the content across the entire site. In essence, the admin site will be a graphical frontend for the database, supporting operations for creating, editing, and deleting rows in our application's tables. The excellent Flask-Admin extension provides almost all these functionalities out-of-the- box, but we will go beyond the defaults to extend and customize the admin pages.
In this chapter we shall:
Install Flask-Admin and add it to our website
Add views for working with the
Entry
,Tag,
andUser
modelsAdd a view for managing the website's static assets
Integrate the admin with the Flask-Login framework
Create a column to identify a user as an administrator
Create a custom index page for the admin dashboard