On 3/6/06, Jacob Kaplan-Moss <[EMAIL PROTECTED]> wrote: > I think that if the foreign key is None (for whatever reason), then > __get__ should return None; otherwise it should expect a valid > reference to exist and raise DoesNotExist. (For template authors, > note that DoesNotExist exceptions are swallowed silently by the > template engine so you don't have to worry about being bitten by this).
Speaking of which: right now the Template engine isn't swallowing the Descriptor's DoesNotExist. I mentioned this and posted a patch: http://code.djangoproject.com/ticket/1396 Basically, resolve_variable() isn't checking for silent_variable_failure for attribute/property/descriptor lookups (it was only checking for that on callable). -- --Max Battcher-- http://www.worldmaker.net/ All progress is based upon a universal innate desire on the part of every organism to live beyond its income. --Samuel Butler --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-developers -~----------~----~----~----~------~----~------~--~---