#8483: Admin interface does not check for incompatible generic relations
-------------------------------------------+--------------------------------
          Reporter:  smoluf                |         Owner:  ramiro    
            Status:  closed                |     Milestone:  1.1       
         Component:  django.contrib.admin  |       Version:  SVN       
        Resolution:  wontfix               |      Keywords:  pycamp2009
             Stage:  Accepted              |     Has_patch:  1         
        Needs_docs:  0                     |   Needs_tests:  0         
Needs_better_patch:  0                     |  
-------------------------------------------+--------------------------------
Changes (by jacob):

  * status:  new => closed
  * resolution:  => wontfix

Comment:

 It turns out that this is nearly impossible to check accurately. For
 example, the check in your patch for the class of the `object_id` field
 against the model's PK can't take into account fields that can be coerced
 into the right type. This is especially a problem because `AutoField` is
 one of those -- it's not an `IntegerField`, but it has a correctly typed
 value. Your check, then, prevents an `IntegerField` `object_id` from
 pointing to an `AutoField`, which is clearly incorrect. But it's more
 subtle than that: think about things like `FilePathField` that don't look
 anything like a `CharField`, but end up returning characters.

 Ultimately, this is just a case where we have to expect users to do the
 right thing. We can't check every possible mistake someone might make.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/8483#comment:5>
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to