updated views.py

Corrected syntax, tried writing selfe edge to a table (succeeded).