You have 2 or more Django applications. You wish to hook each to a separate domain. Behind the scenes, they’re two or more separate gunicorn…
Category: Django
Django Management Commands via Cron
Posted in Django
You want to periodically run a Django management command. How do you go about it? Let’s get to it. Folder Structure app_folder > management >…
Soft Delete in Django Quickly
Posted in Django
Adrienne Domingus has a beautiful article on soft delete in Django, taking the custom model manager approach. (Article here). Let’s see another quick way to…
Pagination is an essential part of platforms where one needs to list many items. Instead of displaying all the times, say 50,000 records, pagination allows…
Django remains my favorite Python web framework and my favorite of all frameworks. I’ve built applications with other frameworks such as Laravel, Rails, Node-Express and…
One Object per User in a Model
Posted in Django
Sometimes, just sometimes, we want our users to add only one object per user per model. As in, when they add an object to a…
Sending Django Emails [with examples]
Posted in Django
Django Emails makes sending emails – either error messages or user sign up emails via an authentication system – is easy. Let us take a…
Three things are infinitely complex: The Universe, Django’s crazy static file serving, and Django Custom Error Views. The infinity of the universe, no two ways…
In the beginning was Init. Then came Systemd. If you’re wondering how to switch your Django apps from Init to Systemd, here we go! I…
Hello, and welcome! If you’ve recently upgraded to Ubuntu 16.04 LTS, you probably are wondering if there are any revamps you might need to do.…