Updated views.py with crossdomain code