Archive for the 'Django' Category

Resources for the Django newb

Monday, March 5th, 2007

Nate pointed out a link to the Top 10 Resources for Django-Newbies.

You know, he claims to be all about Ruby and Perl… but I think deep down inside, he wants to code in Python. The sooner he comes to terms with that fact and just admits it, the better off he’ll be. :)

Running Django with CherryPy

Sunday, March 4th, 2007

So you want to use Django, but you don’t want to use Apache and mod_python? DjangoCerise is a wrapper that lets you use CherryPy and WSGI instead.

Random Jacobian goodness

Saturday, March 3rd, 2007

Jacob Kaplan-Moss has slides and notes from his Django tutorial, as well as some random quotes overheard at PyCon.

Django WSGIRequestHandler error

Thursday, March 1st, 2007

So I was playing with a small Django application the other night (a weblog, if you care) and found that I was unable to connect to the development server.

Firefox would tell me:

The connection was interrupted
The connection to 192.168.1.4:8000 was interrupted while the page was loading.

And the development server would report the following error:

AttributeError: WSGIRequestHandler instance has no attribute ‘path’

What was the problem? Heh, it was me being stupid.

It turns out I was accidentally typing https://192.168.1.4:8000 instead of http://192.168.1.4. I’m used to using SSL for connecting to my home server and I guess I did that by accident when connecting to the Django runserver.

So if you get that error, check to make sure you aren’t accidentally trying to use SSL.

Django Snippets

Wednesday, February 28th, 2007

Django Snippets is “a site for users of the Django web framework to come together and share useful snippets of reusable code.”

It was down the other day, but it is back up and running… and it’s quite cool. Not a lot of snippets in the database at this point, but I’m sure that will change. It’s quite popular in the #django channel.

Full-stack vs. glue vs. coupling

Tuesday, February 20th, 2007

Yesterday I mentioned James Bennett’s discussion of the two camps of Python framework design. Ian Bicking has responded to James and seems to disagree.

Quoth Ian in his Full Stack vs. Glue post:

In a recent post on Framework design James Bennett describes as a fundamental dichotomy in framework design
“full-stack” vs. “glue”. In this case, Django (which James works on) as a full-stack framework, and TurboGears and Pylons as glue frameworks. This is not a good way to describe the differences.

He then discusses “awkward glue and easy glue”, the “intent” of the pieces, and “coupled” versus “decoupled” frameworks. Read the whole thing.

I have to admit that I tend to agree more with James on this one.

Sure you can get all nuanced and discuss the subtle differences in terms for each program design element… but when it comes down to it, the glue vs. full-stack gets the point across. For better or worse, some frameworks glue together existing parts (e.g. TurboGears and Pylons), and some write the whole thing from the ground up as a full-stack (e.g. Django).

There is nothing inherently wrong with either approach. And if you ask me, having two competing ideas is a Good Thing. I’d expect the invisible hand to deliver us even better frameworks in the future. So does the nomenclature really matter?

The two camps of Python framework design

Monday, February 19th, 2007

James Bennett’s The B-List is quickly becoming one of my favorite blogs. Today he has a very clear-headed post regarding Python web framework design. It’s long, but if you are at all interested in the TurboGears vs. Pylons vs. Django debates… it is well worth reading the whole thing.

Django tips at The B-List

Sunday, February 18th, 2007

I’ve linked to many of these before, but I think they are worth linking to as a whole. Check out the Django category over at The B-List for a ton of great tips. Good stuff.

Django cheat sheet

Tuesday, February 13th, 2007

Matt Riggott and Ed Wroblewski have created a one page Django cheat sheet (PDF).

Little Django surprises

Tuesday, February 13th, 2007

Chris McAvoy is happy to be behind the Django curve:

…Django is an awesome moving target. As I sort of jump in and jump out on a couple month interrupt, I love these little surprises. I’ve known there was a Django testing framework for a while now, I just haven’t used it. Now with little-mini-project, I’ll have a reason to use it.

Cool.