Flask - complete MVC site to navigate around a data set
Archive - Originally posted on "The Horse's Mouth" - 2015-10-13 21:44:15 - Graham EllisA full demonstration from today - Flask Model, View and Controller. There's an index page listing links to all UK railway stations, and individual pages (via a 3 letter code URL) for each station. Here's the log of a session:

and some of the pages in that session:



The main router and controller: stations.py
The model: station_model.py
Data for the model: rstats2014.xyz
The base view template basestation.html
The template for the index allstations.html
And the template for individual stations astation.html