Alex Gaynor 11/4/2008

More Laziness with Foreign Keys

Read Original

This article details the creation of a reusable LazyForeignKey field in Django, extending the standard ForeignKey to automatically generate a custom manager for related objects. It provides code examples and explains how to generalize a solution previously built for the User model, making it applicable to any model relationship.

More Laziness with Foreign Keys

Comments

No comments yet

Be the first to share your thoughts!

Browser Extension

Get instant access to AllDevBlogs from your browser

Top of the Week