Skip to content

Commit a1194b1

Browse files
committed
Add snappify diagram for dictionary-to-model change when interacting with MongoDB.
1 parent a0241cc commit a1194b1

File tree

1 file changed

+6
-0
lines changed
  • curriculum/section14/lectures/08_receive_validate_wtform

1 file changed

+6
-0
lines changed

curriculum/section14/lectures/08_receive_validate_wtform/README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,12 @@ I think one of the best ways to do this is a `dataclass`. This is a Python objec
8484
## Create a class for storing movie data
8585
Let's start by creating a `movie_library/models.py` file. Inside it, we'll define a class that represents a movie.
8686

87+
::: tip
88+
I made a diagram to help you visualize the change from dictionary to class for handling data and interacting with MongoDB. Hope it helps!
89+
90+
Link: [https://snappify.io/view/b0880dd5-59c8-4d4b-902b-ca26b1681bb2](https://snappify.io/view/b0880dd5-59c8-4d4b-902b-ca26b1681bb2)
91+
:::
92+
8793
To "represent" a movie we'll define the properties of an object of said class, so that when we create an object, it will have all those properties.
8894

8995
Using the `dataclasses` module, you'd do it like this:

0 commit comments

Comments
 (0)