I try to make a very simple cache usage:
myquery = 
UserProfile.objects.select_related('user').filter(status__exact=1).values_list('user__username',
 
'q_points').order_by('-q_points')[:50]
cache.set('test_cache', myquery, 3600)
print cache.get('test_cache')
I get an error:
UserProfile has no field named 'username'
The thing is query is OK and returns valid results.

Debug Toolbar shows that cache value:
([(u'admin', 2L), (user1', 0L), (testuser', 0L)], 3600)

I have no idea what is wrong :/

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/4-Bdfxea-_UJ.
To post to this group, send email to django-users@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