#8746: Data entered in raw_id_fields needs better checking
-------------------------------------------+--------------------------------
          Reporter:  kmtracey              |         Owner:  nobody  
            Status:  new                   |     Milestone:  post-1.0
         Component:  django.contrib.admin  |       Version:  SVN     
        Resolution:                        |      Keywords:          
             Stage:  Unreviewed            |     Has_patch:  0       
        Needs_docs:  0                     |   Needs_tests:  0       
Needs_better_patch:  0                     |  
-------------------------------------------+--------------------------------
Comment (by [EMAIL PROTECTED]):

 I just discovered this '''raw_id_fields''' bug and also believe it is
 lacking Form validation. The raw-id field should raise a
 '''ValidationError''' when the contents is not the right data type.

 I have a ManyToMany model that has a '''through''' model. An Inline admin
 class links the '''through''' model to the parent model. In my case, the
 '''primary key''' is declared to be a CharField, a US ZIP code, not a
 plain integer key.

 The raw_id_fields fix must determine the '''primary key''' datatype of the
 model, type(instance.pk), first. Then, its Form field raises
 '''ValidationError''' when TypeError is thrown.

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