changes to views.py and models.py that broke the code