Home Archives Pseudo FAQ
2008.07.19

Dear Django...

As some know, this blog is written in Django, a custom web development framework for Python programmers. It's very nice, and so I decided yesterday to write a new project with it.

As nice as Django is, getting a project off the ground with it is a complete and total pain in the ass (in comparison to the very little work it takes to getting PHP going). It's a glorious framework, but there's just a couple things that randomly don't work and make it completely infuriating to get anything done. So, without further ado, here are my notes...

1. Your development server sucks.
Mind you, I probably shouldn't look a gift horse in the mouth. After all, they included a development server, which makes developing on Leopard possible (since getting mod_python working on Leopard is a non-starter). That said, it would have been nice if they could have gone one step farther and made it...work. My current problem? Well, in django/views/static.py, they call (in one of their internal functions) "fullpath = os.path.join(document_root, newpath)" This would be fine, except the Django dev server doesn't have a document root, and so this raises an AttributeError because join expects a string (instead of None, which actually gets sent). Brilliant, folks. Oh, and the development server doesn't function for more than a couple minutes if it runs as a background process (on Leopard). Even better. I love keeping Terminal windows open to aggregate web server output.

2. Get your head out of your ass and add a search feature on your website.
Enough said. Why is this not there? I want to do something very simple (in this case, make static images work on the development server), and I can't find a damn thing in the documentation because it doesn't fit your near little headers cleanly. Of course, if I could have searched for things, this would be a non-issue.

P.S. I still haven't gotten static images to serve at all from the development server. Anyone know how to do this?

comments(1) | permalink

Posted by at 5:07 p.m.

After several additional hours of frustration after I wrote this entry, I did get static images to serve (apparently it's django.views.static.serve, with an extra document_root argument sent within a dictionary).

Ironically, I found this when I finally found the cleverly hidden search capability, which is displayed in a somewhat non-standard location on exactly one page. Someone fails at UI.

Posted by on 2008.07.20 at 10:39 a.m.

Post a Comment