#9619: to_python not called when fetching data with .values(...)
---------------------------------------------------+------------------------
          Reporter:  Valera Grishin                |         Owner:  nobody
            Status:  new                           |     Milestone:  1.1   
         Component:  Database layer (models, ORM)  |       Version:  1.0   
        Resolution:                                |      Keywords:        
             Stage:  Design decision needed        |     Has_patch:  0     
        Needs_docs:  0                             |   Needs_tests:  0     
Needs_better_patch:  0                             |  
---------------------------------------------------+------------------------
Changes (by mtredinnick):

  * stage:  Accepted => Design decision needed

Comment:

 This is a bit of a line-ball, since it's called ''values'', not ''Python
 objects'', so returning the data representation isn't a completely bad
 idea -- leaving it up to the user to decide what they want to do with it.
 For example, complete consistency here would then be converting foreign
 key values to their corresponding Python objects (kind of defeating the
 purpose of calling `values()` instead of a normal queryset). I've just
 wontfixed #8144 about that particular issue (largely because of the huge
 impact it would have on existing code).

 I'm kind of in favour of staying away from `django.db.models.fields.Field`
 entirely when working with `values()` and `values_list()`, keeping it as
 the fast path for raw data.

 I'm going to risk the wrath of Jacob and DDN this for a little bit. I
 think we need a discussion when there's a quiet moment.

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