Update 2019: the stack described here is now considered obsolete. Please see our new way of deploying Django apps.
Introduction
Previously my stack of choice for deploying django apps was apache + mod_wsgi. Recently I had to move the website you are currently reading to a new server. I took this opportunity to consider moving to a new stack. Here is my feedback and an in-depth guide on how to do ...
read more
In some code I wrote today I needed a way to check that all items in a list are contained in an other list. And I came up with a one-liner I found useful enough for sharing :
>>> big_list = [1,2,3]
>>> small_list = [1,3]
>>> all([i in big_list for i in small_list])
True
>>> small_list = [1,4]
>>> all([i in big_list for i in small_list])
False
read more
It happens you may want to save one of your model but without triggering any pre_save / post_save signal, nor the save() method of your model. Reasons could be, your are restoring some fixtures data, you don't want to update the object modification date that is configured with auto_now = True, you want to skip some validations, etc.
There had been a ticket opened in the past to request such a ...
read more