HTMX + Django: Modern Python Web Apps, Hold the JavaScript Transcripts
Chapter: Surveying the non-JS-enabled Django app
Lecture: Video model object

Login or purchase this course to watch this video and the rest of the course contents.
0:00 To work with a YouTube video, it's helpful to have YouTube's ID of the video.
0:07 It's important to remember the difference here between the ID of the video object, which is named ID, the default for all Django models,
0:15 and the ID of the YouTube video, which is a field on the object. The Title and Author fields store info about the video so it can be shown on the site.
0:26 The View Count field contains a counter of the number of times you viewed the video.
0:30 Now that I'm saying that out loud, I'm pretty sure it does no such thing as it never gets updated. Let's call that a bug and move on.
0:38 A video object can belong to more than one category, so I'm using a many to many field to track those relationships.
0:48 Unless your eyes are far better than mine, you probably can't make out there's a little outline bullet icon in the nav bar in that image.
0:57 If you click on that, it takes you to the site's feed containing all the videos regardless of category.
1:03 Let's take a look at the view that produces that page.

Talk Python's Mastodon Michael Kennedy's Mastodon