Richard Jones' Log: PyWeek web interface development thoughts

Thu, 12 Jan 2006

PyWeek #1 was run in mechanicalcat.net's Zope. #2 will be running on a different machine, so I'm going to look into expanding my web development brain into either Django or TurboGears. They seem awfully similar at the moment, though Django's admin interfaces are kinda tipping the scales. TG's Kid templating is nice, but I don't need MochiKit. I need good authentication / permissions control, which I've not looked into too deeply in either. Sessions would be nice too. Zope's ObjectManager, PropertyManager and a few other things made life kinda nice and replacing those will be interesting. More investigation is needed.

Thanks to everyone who offered support for hosting PyWeek #2! The new website should be up tonight - my crappy web design skills and all :)

Aside: In the comments on the one of the web framework sites, someone's written "Wholly cow! This is a nice framework!" I've noticed this sort of thing before. There's probably a branch of linguistics, closely related to the mondegreens (misheard lyrics) stream, that's all about misheard exclamations.

Comment by justus on Thu, 12 Jan 2006

I started using django for a personal project and almost immediately ran into limitations with its object/database mapper. It uses objects instead of strings to denote relations. Which makes it impossible to do something like:

class Author:
books = Relation(Book)

class Book:
authors = Relation(Author)

There was no mention of this problem anywhere in django's documentation. sqlobject (what turbogears uses) solves this problem correctly by using strings instead of python objects.

FWIW, turbogears has an admin module now called CatWalk. I haven't used it myself, though.

Comment by jml on Thu, 12 Jan 2006

justus: Take a look in the Django model reference under "many-to-many" relations. You only need to specify the relation in one of the models.

Comment by Adrian Holovaty on Mon, 16 Jan 2006

Justus: What jml said, and note that the next Django release, 0.92, will allow strings in model relationships, so you'll be able to do ForeignKey('SomeModel'). We've already got this working in a code branch.