Simplify views.py