modify views.py according to the modification of ami_service module