About Boolean Fields
When creating boolean fields, make sure to state them positively. They will be represented as checkmarks in the administration and it will be less confusing.
DO USE:
class Post(models.Model):
is_shown = models.BooleanField(default=True)
is_featured = models.BooleanField(default=False)
is_published = models.BooleanField(default=False)
DON'T USE:
class Post(models.Model):
is_hidden = models.BooleanField(default=False)
is_regular = models.BooleanField(default=True)
is_draft = models.BooleanField(default=True)
Tips and Tricks Programming Development Django 5.2 Django 4.2 Django 3.2
Also by me
Django Paddle Subscriptions app
For Django-based SaaS projects.
Django GDPR Cookie Consent app
For Django websites that use cookies.