modified views.py to save new parameters with document