Django 1.10 removed the very helpful --list (or -l) option from the manage migrate command. This option was deprecated since 1.8. But don't worry, you can have the same output using:
$ ./manage.py showmigrations
You can also see in which order your migrations will be applied using the --plan option:
$ ./manage.py showmigrations --plan
read more
We are currently working on a project that loads and dumps very big JSON objects. We recently had some slowness issues and though giving a try to some C compiled JSON modules could give a boost to our API.
After some googling we found out a few exsting modules and decided to setup a benchmark to decide which one to use. The selected modules are:
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