Python and Django

Three weeks ago I started working on a front-end for a project. A while back I had made a conscious decision to use Python for it because I did not know Python and wanted to learn it.

I did a quick whip-round of colleagues’ opinions on front-end frameworks and settled on Django, also influential was the Floss Weekly interview with Jacob Kaplan-Moss which gave me a good overview of the design philosophy behind Django.

I spent two weeks going through the “Learning Python” book and scanned the “Python Cookbook” for ideas and patterns, and went through the Django tutorial.

Admittedly, I have only been using all this stuff for three weeks, but what struck me was that Django expects you to define a data model to be able to take full advantage of the framework. My situation is a little different, I have my own data model which is accessible via a REST web based API, so I am just using the views so far, which is fine. I wonder if one could replace the data model with a web API, after all both approaches expose data and structure. I expect that I will have an answer for that question as I dig further into Django.

Advertisements

4 Responses to Python and Django

  1. airhead says:

    Perhaps you are already past this stage but Mark Pilgrim’s Dive Into Python is another great resource for learning Python.

    http://diveintopython.org/

  2. Thanks, I knew about it but had not yet bought it, it is now on order.

  3. vsethmohta says:

    Glad to see you using Django. We’ve been using it for the last 9 or so months for our site.

    BTW, if you are primarily using Django for its views / templates, one option worth considering: using Jinja2 for the template language. We have been happily working with Django’s template language and occasionally reading about Jinja. Last night, I read an article (http://lucumr.pocoo.org/cogitations/2008/09/16/why-jinja-is-not-django-and-why-django-should-have-a-look-at-it/) that has me much more seriously considering a move to Jinja, sooner rather than later.

    Good luck with Django, whichever way you go templates!

  4. Thanks, I will check this out. I have not yet fully decided how I will use Django, I am still digging into it.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: