Anyhow, here's what I have in mind for the backwards compatibility story:
This patch leaves the old generic views as-is, using manipulators.
This partially fixes the problem, we get ModelForm based generic views
living side by side with the old manipulator based ones. People can
svn up without breaking anything, and convert their code at their
convenience. At some point I think we'll want to either get rid of the
old functions, or convert them to use the new classes (should be
trivial). Personally, I'd rather do the former, but I'm probably in
the minority there.
Malcolm has pointed out that the post_save method is probably not such
a great name. I agree. So, what color would *you* paint that
particular bikeshed?
Joseph
So that we're clear: my problem with post_save is that it isn't at all
self-explanatory. It tells you when the function runs, not what it does.
It's good friends with functions called sometimes(), on_every_request()
and only_when_necessary().
A function's name should give you some hints as to the utility of the
function. So something like construct_response(), since it's actually a
hook for providing tweaking after the main action has run when you want
to control the response -- the one thing that's hard with generic views
at the moment.
Regards,
Malcolm
--
I've got a mind like a... a... what's that thing called?
http://www.pointy-stick.com/blog/
I like the flexibility that the class-based approach brings. I think a
similar idea could be used to clean up the duplication happening in the date
based generic views. Anyone know if that has been attempted?
> Anyhow, here's what I have in mind for the backwards compatibility story:
>
> This patch leaves the old generic views as-is, using manipulators.
> This partially fixes the problem, we get ModelForm based generic views
> living side by side with the old manipulator based ones. People can
> svn up without breaking anything, and convert their code at their
> convenience. At some point I think we'll want to either get rid of the
> old functions, or convert them to use the new classes (should be
> trivial). Personally, I'd rather do the former, but I'm probably in
> the minority there.
I'm with you on keeping them side-by-side and then removing the
manipulator-based views when we take out oldforms.
Gary
Not to my knowledge, but if someone else doesn't try it first, I'm
going to eventually. ;-) That goes for the list_detail ones as well.
Joseph