Django signals: How to Run Code on Model Events (e.g., post_save)
What if you want to automatically send a welcome email every time a new user signs up? Or create a User Profile the instant a…

What if you want to automatically send a welcome email every time a new user signs up? Or create a User Profile the instant a…

Your blog is a success! You now have 1,000 posts. But you have a problem: your Post List Page now tries to load all 1,000…

You have a Django User model, but it only has username, email, etc. What if you want to add a bio, a profile_picture, or a…

You’ve used admin.site.register(Post) to add your model to the admin. But the result is ugly: just a list of Post object (1), Post object (2),…

You’ve secured your views. Now you have a new problem. When a user creates a new post, how do you save who that user was?…

A blog isn’t complete until users can comment. This project will teach you one of Django’s most important concepts: database relationships (ForeignKeys). Building a Django…

In our last security guide, we used LoginRequiredMixin to block logged-out users. But this still leaves a security hole: Any logged-in user can edit any…

You’ve built a full CRUD application and a Login System. But there’s a huge security hole: Anyone can visit /post/5/edit/ and change your posts! To…

Let’s add a “profile picture” or “post image” to your models. Working with Django File Uploads means handling files involves three key parts: the Model,…

You deployed your Django app, but it looks terrible—all the CSS and images are missing! This is a common issue that can often be resolved…
We use cookies to improve your experience on our site. By using our site, you consent to cookies.
Manage your cookie preferences below:
Essential cookies enable basic functions and are necessary for the proper function of the website.
You can find more information about our Cookie Policy and Privacy Policy.