Wednesday, 15 August 2012

Optimizing my Django app on Google App Engine -



Optimizing my Django app on Google App Engine -

i'm optimising particular utilize case of django app. first step replace queryset valuesqueryset. worked quite want more. i'm considering using memcache (the app running on google app engine). plan set valuesqueryset in memcache. understanding valuequeryset not yet materialised info structure. in order cache work, valuequeryset needs materialise first , set in memcache.

according django docs:

list(). forcefulness evaluation of queryset calling list() on it.

and:

finally, note valuesqueryset subclass of queryset, has methods of queryset.

but when seek my_values_qs.list() throws exception:

attributeerror: 'valuesqueryset' object has no attribute 'list'

so, although valuesqueryset subclass of queryset apparently cannot list() contents. which, if true, mean django docs wrong or @ to the lowest degree misleading.

am missing or docs indeed wrong? best way materialise result of valuequeryset can store in memcache?

you're misreading bit docs. doesn't "call queryset.list() method": says "call list() on it". in other words, phone call list(my_queryset), not my_queryset.list() - , in fact explicitly illustrated illustration afterwards.

note has nil subclassing: queryset doesn't have list() method either.

django google-app-engine optimization

No comments:

Post a Comment