How do you know they weren't deferred?  You can still access them if they
were, IIUC.  It just causes additional queries, behind the scenes.

On Mon, Feb 22, 2010 at 12:31 PM, Dexter <a.essel...@gmail.com> wrote:
> Oh, I'm sorry,
>
> no error appears, but the queryset returns the complete objects with all the
> fields, not only the name field
>
> On Mon, Feb 22, 2010 at 6:30 PM, Daniel Roseman <dan...@roseman.org.uk>
> wrote:
>>
>> On Feb 22, 5:15 pm, Dexter <a.essel...@gmail.com> wrote:
>> > Hi,
>> >
>> > Im using django 1.1.1, and i'm trying to defer a queryset, but it
>> > doesn't
>> > seem to work.
>> > Here's my callback:
>> >
>> > def open(request, id=None):
>> >
>> > >     """Callback to fire when a specific floor is opened."""
>> > >     if request.user.is_authenticated():
>> > >         if id:
>> > >             data = serializers.serialize('json',
>> > > Floor.objects.filter(id=id))
>> > >         else:
>> > >             object = Floor.objects.only("name").all()
>> > >             print object.values()
>> > >             data = serializers.serialize('json', Floor.objects.all())
>> > >         #print data
>> > >         return HttpResponse(data)
>> >
>> > >     return HttpResponse("Operation not permitted!")
>> >
>> > Thanks in advance.
>> >
>> > Grtz, Dexter
>>
>> What doesn't work? You didn't post the traceback, you posted the code.
>> It would have been useful to have the error message, if there is one,
>> or some indication of what you are seeing versus what you expected to
>> see.
>> --
>> DR.
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To post to this group, send email to django-us...@googlegroups.com.
>> To unsubscribe from this group, send email to
>> django-users+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/django-users?hl=en.
>>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-us...@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to