view.py: doesn't require database connection any more (issue 1)