Cleaned up the view() function. Removed unecessary returns. Also corrected an issue by switching graphlist.extend to graphlist.append to simply the result for processing in the view.
Modified so that the link to view the graph is conditional on there being a JSON file in static/json/ for the tree in question. If the file does not exist, the link will not display.