Updating preview.html and views.py to improve compatability.