Monday, February 15, 2010

Diving Into Django

After our previous milestone, I decided on a little change of pace. I was feeling okay with Elgg, but I wanted to see if I could get something done using a different framework. I've been meaning to learn a little Python and I know people who have used the Django framework. To start, I began researching Django tutorials and plugins.

First, I went through a few tutorials on Django, including the one in the Django documentation. Coming from a Rails background, I noticed quite a few differences. First, there aren't that many generated files. Rails creates quite a few folders and files when you start a new project. However, the script only creates a few Python files. Which is okay as long as I don't need to dig through the Django install to change things. If all of the things I need are in my newly created app, that's fine.

I guess the real difference is simply that there's more configuration in Django. A templates folder is neither created nor required unless you change the Even after an app (as in the plugin within your Django web app) is created, it is not used until it is added to the INSTALLED_APPS field of the

After going through these short tutorials, I know I've only scratched the surface. I borrowed a book from a friend and we have another book on order from Amazon. Going through those books should help me get more comfortable with Django.

I did some tinkering around with two Django based applications: Pinax and Django-CMS. I was interested in Pinax because they tout themselves as being an easy way to get started quickly. I found that when you start a Pinax project, you do get a pretty functional interface. However, I was a little soured on it because adding and removing the included apps was kind of a pain. There is some template file in the Pinax code that needs to be changed when I remove an installed app. There's probably some work around

Django CMS was a little tricky to set up especially with some of the recommended software (like reversion and south). Once I got it working, I found that at least the admin site works like any other Django site. Django CMS does not come with any out of the box templates though, so I need to create my own template files. Not ideal for getting started right away.

Pinax seems like the obvious choice for getting started right away. But if I can create some decent templates in Django-CMS, then that could be a viable alternative.

Time to flex them Pythons!

No comments:

Post a Comment