mongodb tumblelog tutorial code. With python 2.7