updated views.py with os module