> So, I'd still like to do the multi-column field
> support (and probably the static file handling in the dev server, but
> I haven't fleshed that idea out completely yet).
>
> I have a fairly decent idea about how to implement the guts of the
> multi-column fields.
Good idea, a useful contribution, and you're not the first person to
think of it:
http://code.djangoproject.com/ticket/5929
This has been accepted, but nobody is working on it to my knowledge. A
related concept is:
http://code.djangoproject.com/ticket/373
which extends the multi-column issue to primary keys. dcramer has
claimed this ticket, but I don't know how active he is working on it
(since is was claimed last September).
Some quick thoughts to get your mental juices flowing:
- There are two ways to think about multi-column in the tree: A single
field definition that rolls out as multiple database fields, and a
syntax for combining two model fields into a single logical field. The
latter approach is what is used by GenericRelations, but the former
would also be quite useful.
- If you address the primary key issue, the biggest issue is the
admin. Objects in the admin must be uniquely addressable, which means
that you need to work out how to split multiple primary keys in a URL.
This has been discussed a few times in the past on django-developers;
in short, there is no solution that is both simple and maintains 100%
correctness, but admin support is a prerequisite for any modifications
to primary keys.
- Don't bother doing anything with the current admin. Newforms Admin
might take a little while to get to completion, but even if it takes
longer than the end of the summer, nobody in the core is going to
spend any time trying to merge code into the trunk admin, only to need
to reinvent it in NFA.
Best of luck with your GSOC application.
Yours,
Russ Magee %-)
The bigger issue is probably best represented by generic relations. Both
this and admin logs are an example of things that are represented at one
end by (content type, object id) and we don't want to break every piece
of code in existence. As Jacob has pointed out at some point in the
past, the admin URL situation isn't too bad with respect to not breaking
backwards compat because the content type will enable us to determine if
it's a single column primary key or a multiple-column primary key.
I should say, though, that I suspect multi-column primary keys is
probably not a good summer of code project. Except for that one issue,
it's really fairly easy and that one issue is quite hard. So I don't see
there being a sustained 12 weeks of work in that. You'll either spend 10
weeks thinking about that one problem or be done in the first couple of
weeks.
Plus I kind of have to solve some of this multi-column stuff in the next
few days to get queryset-refactor finished. The last remaining big thing
is reverse generic relations and I want to create a proper solution
there, not a content-type-based hack that's specific to that one field.
Still a general infrastructure (the class outline) for creating a
multi-column field would be interesting to have, but, again, I'm not
sure it's a full summer's worth of coding.
Malcolm
--
Experience is something you don't get until just after you need it.
http://www.pointy-stick.com/blog/