#9104: FieldDoesNotExist is defined in "confusing" place.
---------------------------------------------+------------------------------
Reporter: telenieko | Owner: nobody
Status: new | Milestone: post-1.0
Component: Core framework | Version: SVN
Resolution: | Keywords:
Stage: Design decision needed | Has_patch: 0
Needs_docs: 0 | Needs_tests: 0
Needs_better_patch: 0 |
---------------------------------------------+------------------------------
Comment (by mtredinnick):
We can't move it (backwards compatibility is important), but we could add
an alias in the other place, maybe.
However, the reason for its current location is that this is not an
exception that correct user code will ever see. You will see something
like `ObjectDoesExist` because that can happen naturally. But your code
should never be catching `FieldDoesNotExist`, since that would just mean
you had made an error in your code 99% of the time (there are some
introspection cases where it might not. I guess that is why the admin
interface is using it). So declaring the exception where it is actually
used and then only using it internally isn't a bad thing.
What's the use-case where you actually need to ever import this exception?
--
Ticket URL: <http://code.djangoproject.com/ticket/9104#comment:2>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---