Sunday, July 13, 2008

Learning Django

Quite honestly, I haven't done any web programming since I quit PHP. I do hear a lot of about all those Python web frameworks, so when I saw a link to the Django Book, I took the initiative and started reading. I haven't tried out any other frameworks, but my initial reaction is to love Django. It's obviously well designed around DRY and the Zen and very well documented. Django models are beautiful and makes SQL very painless.

Having worked through the examples in the book, I've started conceiving a larger project. I'd like to make my personal homepage. Obviously, it would have a lot of static content, and I want to do that in the clearest way possible. So, I'll steal a hint from the django docs: write my site in reST and dynamically generate the webpage with docutils. (It will be a good exercise with caching.) In fact, I have a version running locally.

[My first lazyweb query:] Where can I get good Python hosting? I'll need to upload Django, too because I'm running off SVN. Can it be gotten cheap or even for free?

Also I am splitting off rstpages from PyConTech (in the middle of the work right now).

This will get you all the restructuredtext stuff you want in django. I would NOT use the builtin restructuredtext stuff in the django markup module. It is insanely insecure and buggy. (unless you want your headings not to be rendered, the ability for any arbitrary shell commands being run on your server, and random crashes at startup).

The django-wiki project has already converted over yo the rstpages code (for the functionality it needed).

Once I get the core done I plan on adding pygments and LaTeX mathematical expression support (as optional configs).

It includes support for rendering any restructured text in a template (tags/filters), serving up rst files on disk as html (generic view), online editable site content like a wiki or private editing with error detection, rss feeds, html diff, page index, site index, change history (generic views).

I am looking for people to help me with it and it will also be a part of the second Pinax web project after cloud27.