fix pep8
Fix templates, make them use project model