Chapter 12: A challenge¶
After working through this book, you should be ready to build a simple web application on your own. Here is a challenge: add a guestbook to Watchlist, similar to SayHello.
Some suggestions to get you started:
- Define a model for messages and update the database tables.
- Create a template for the guestbook page.
- Add a message form to the template.
- Create a view to display the guestbook page.
- Handle form submissions in that view.
- Generate sample data for testing.
- Write unit tests.
- Update the deployed application.
- Consult the SayHello source code if you need an example.
If you get stuck, start a discussion in the Code Kitchen community, using the “Flask 入门教程” (Flask for Beginners) category.