RalphLepore.net


Django Constraints

As of Django 2.2, you can add database constraints to your models.  I find database constraints extremely valuable and one of those few features that Django really needed.

This blog post is more of a quick reference for myself when adding constraints to my Django models

Django has support for both CheckConstraints and UniqueConstraints.&n…

Read More...


Custom Foreign Key Constraints with Django

The current project I'm working on has database tables that are over 2 million records which I'm populating from an external source. The external source provides a postgres dump file to help make data imports easier.

My current approach is to restore the backup to a temporary database and use the PostgreSQ…

Read More...