Temporary moved functions from separate file into views.py