On Dec 15, 2007 9:35 AM, shabda <[EMAIL PROTECTED]> wrote:
> Should not the object returned by .get() have
> a .values method?
No, because -- as the documentation clearly states -- get() returns a
single model object. Only methods which return a QuerySet will have a
values() method, because value
The call ModelObject.objects.filter(id = entry_id).values() works fine
and the call to .values converts the model object to a dictionary. But
the call ModelObject.objects.get(id = entry_id).values() fails as the
object returned by get doesnot have a .values method. So to convert
this to dictionary
2 matches
Mail list logo