Whenever an action happens on data in the database, you can create activity logs so that activity by different users can be audited. This logging is part of good cybersecurity practice. In this video, learn how to implement an activity log.
- [Instructor] Whenever a user changed … some model in our system, … we want to make sure that we log this action. … The idea is that if there ever is a need for auditing, … we have a log of activity that took place … on the user's account or on their data. … We start by creating the activity log model. … The user is a foreign key to the user instance … that modified or updated or performed … whatever action it is we're logging here. … And the action is a description … of the action that took place. … So, whenever we save a booking, … we're going to be creating an activity log. … The user is the user who created the booking, … and then we actually create the activity log, … and the action description will be user with an ID … and email address, saved a booking with this particular ID. … So we have the user ID, … their email address, and then the booking ID. … And then we add the activity log model to the Jango admin. … Create the activity log model admin … as list display of the ID and the action. …
Skill Level Advanced
Building a Paid Membership Site with Djangowith Nick Walter1h 15m Intermediate
OWASP Top 10: #7 XSS and #8 Insecure Deserializationwith Caroline Wong26m 31s Intermediate
Building RESTful Web APIs with Djangowith Rudolf Olah1h 9m Intermediate
1. Permissions, Access Controls, Activity Logs
2. Throttling a Flood of Requests
3. Protecting Data and Data Privacy
4. 2FA: Two-Factor Authentication
5. CSRF: Cross-Site Request Forgery Protection
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.