cache.get_or_set : function name is misleading
Hi, I wanted to refactor my code using cache.get_or_set instead of using cache.get and then check for None and so on However, after a few tests, it seems that get_or_set does not work as its name suggests: it is more get_or_add than get_or_set Looking at the source code, it indeed does a get, then a add, not a set. To my mind, the function name is misleading, even if after a careful reading of the doc, it explains that the value is added (not set) if not in the cache. I haven't found anything about this, so i may be the only one astonished by the difference between function name and function main behaviour. However, i think it's useful to live a comment about this for other devs. Cheers Florian -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at https://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/46cbd955-705d-2d52-e1db-a88a40b7c635%40iragne.fr. For more options, visit https://groups.google.com/d/optout.
Re: selecting an item whose relations are all in some desired set
Le 17/05/2016 16:18, David Xiao a écrit : Hi Florian, That's technically correct, but the universe of all possible items might be very large or even infinite so it's not really practical to do it that way. I understand, but i don't now your case precisely. In my case, i do this for a few thousands of "items" and it works like i want. However, it's clearly not optimal. You can use raw sql if you want/can Florian -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at https://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/573B2925.9050203%40iragne.fr. For more options, visit https://groups.google.com/d/optout.
Re: Weird problem in common_settings include
Ok, i've get rid of my "special" mobile_manage.py and pass the --settings option when i start the fcgi process (i use nginx+fcgi, no mod_wsgi). Using manage.py, with each settings file, i can verify that the INSTALLED_APPS is correct and complete. However, i still get the error any idea? thanks Florian -- You received this message because you are subscribed to the Google Groups "Django users" group. 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.