esgibter/fandomstats — pull request #1 by annathecrow (2014-04-30 20:22:30+00:00)
Title: Crow/test

What I did:
1:
I reformatted the app into a package, which seems to be a recomended practice for bigger applications: http://flask.pocoo.org/docs/patterns/packages/
http://blog.miguelgrinberg.com/post/the-flask-mega-tutorial-part-i-hello-world
I created a ````/fandomstats```` folder with an ````__init__.py```` file -- this now acts as a python package. A separate ````run.py```` file is used to start the app. I also moved the functions defining pages into ````views.py````. I think it's still not optimal, because Flask apps use model/view architecture, but I don't know how to format the little bits we have into it, yet. It should look something like this: https://gist.github.com/efazati/4545740
Also, I created a ````/static```` folder where images, scripts and styles will go. (there's an empty stylesheet in there as a placeholder for now)

2:
I built a simple mockup of the API output page - pretty much just an experiment with the templating system, but it works (sorta). I think it's actually a bad example, because I should've used the API to get the data, instead of plugging right into the underlaying function, but... well, I spent an hour wrangling Python dictionaries and just _really_ wanted something to play with, so there. :P