Working with Models
Storing data in a database is a common practice in most web applications. In a Django project, it involves working with Django models. In this chapter, we will create a database model (for example, a movie) and Django will turn this model into a database table for us. We will also explore a powerful built-in admin interface that provides a visual way of managing all aspects of a Django project, such as users and making changes to model data.
In this chapter, we will cover the following topics:
- Creating our first model
- Installing Pillow
- Managing migrations
- Accessing the Django admin interface
- Configuring image upload
- Serving stored images
- Adding a movie model to admin