More Laziness with Foreign Keys
A technical guide on creating a generic LazyForeignKey field in Django to simplify foreign key relationships and add custom manager functionality.
Alex Gaynor is a software resilience engineer focused on building reliable, secure systems across government, industry, and open source. He writes about software security, serialization, benchmarks, and the economics of open-source infrastructure.
202 articles from this blog
A technical guide on creating a generic LazyForeignKey field in Django to simplify foreign key relationships and add custom manager functionality.
A guide to creating a custom Django ForeignKey field that automatically generates a manager to filter objects by user, simplifying user-specific queries.