Since I posted the previous post about Django, I was reminded that I wanted to link to a post about setting up a Python project in a sane way. I’ve used this approach for all my little toy projects, and it really works well (particularly using virtualenv).
Mostly, I always have to remember a way to Google for Jeff’s blog, so with any luck posting it here will help me remember.
The cliffnotes are:
- install virtualenv/set up virtualenv
- setup Django in the virtualenv
- start a new Django project
- set up a new Git repo for the project
- change the settings to have three sets of installed apps instead of one
- use fabric for deployment (I haven’t gotten this far yet)
Needless to say, I got pretty confused. And my ambition fizzled.
Which is why I was super psyched to see this article about getting Django and Angular.js to communicate with each other. It also helps to see someone list out the concepts as they describe them — I didn’t realize that writing the data out into the HTML document as JSON was called “serializing” for example — but I now know what to Google for.
I want to set up a much simpler version of this, which just takes some data from MySQL, serializes it in Django, loads a Django template and then builds the page with Angular. One dataset, one D3 graphic, stitched together with Angular. Seems like it should be possible with this tutorial!