Refactor module db and model Post.
Add tests for module db.
Modified manage.py.