Fixed template bug

Added future imports
Added future imports, enabled ssl and db
Fixed a SQLAlchemy assertion errrr