Update views.py

added training view.