djangosnippets.org: Latest snippets tagged with 'DoesNotExist'https://djangosnippets.org/tags/doesnotexist_1/2010-11-10T12:36:53.234443-06:00Sane OneToOne getter
2010-11-10T12:36:53.234443-06:00Wraithanhttps://djangosnippets.org/snippets/2254/<p>Since django insists on throwing a DoesNotExist rather than just returning a None from the far side of a null OneToOneField, I wrote this to have a sane way of getting those fields out without having to try/except all over in my code.</p>
Freely redistributable