Saturday, April 11, 2015

One Django Tutorial down! I rarely feel ownership of the topic after copycatting each line of code from a tutorial, and so inspired MilesToGo. Which is a simple web application to practice using the Django framework, and show where I am in my running schedule. As you may have guessed I am training for a race, it will be the farthest I have ever run, and so its exciting to see how far I have come.

The initial setup was simple, creating modules for the data I wanted to use, and defining the pathway to my url. With my elementary understanding of Django, and the simplicity of my site I did not use class based views, though I know as I add complexity my views.py and urls.py will be upgraded.

The Django Tutorial shows how to use the Django QuerySets though rows of data are great, I was interested in sending over calculated totals. Such as how many miles I have already run, and how many more lay ahead. Finally after small syntax battles, I correctly queried each data point I wanted to show.

Going forward I would like to add functionality to update the schedule from the website. Perhaps putting in ‘Change the Past’ and ‘Change the Future’ buttons. Or maybe to add graphs to show the change, or display a countdown to the race.