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?

BTW, I'm now aggregated on Planet Python!

6 comments:

cakebread said...

Google's appengine does Django and it's free, but you have to use their storage backend:
http://appengine.google.com/

I doubt you'll find a better Python host than webfaction:
http://webfaction.com/

Note Django takes a bit of memory using mod_python, so keep that in mind when shopping around.

Fuzzyman said...

+1 for Webfaction.

Dougal Matthews said...

Django is really cool. I also have a PHP web background and going to Django is a joy.

I'm still fairly new to Python however but its growing on me fast. I love it.

My only concern is how much work will there be in the language?

Benjamin said...

@cakebreak I doubt Google would appreciate me running a personal site off their servers.

I will look at WebFaction, though.

@dougal
How much work will their be on the language? Python, I assure you, is still under heavy, heavy development.

Doug Napoleone said...

+1 for webfaction.

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).

The old rstpages can be found here:
pycon/restructuredtext/

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.

Gonzalo said...

I've been using Bluehost to host Django sites and it's quite OK, and waaay cheaper than WebFaction. Django is not *officially* supported, but it does work, and you save a lot of money ;)