More Class Based Views

321 views
Skip to first unread message

Iván Raskovsky

unread,
Jun 8, 2011, 11:46:14 AM6/8/11
to django-d...@googlegroups.com
Well.. I wasn't sure when to send this email, mostly cause I haven't
had time to properly document everything, but Russ' talk Wither
Django[0] seems to have done it.

One of the points he mentions in what he'd like in 1.4 is "More Class
Based Views". I've started working sporadically in an external app[1]
before 1.3 was released.

I've implemented CBV for formsets, modelformsets and inline
formsets[2], and with some more work in them I think they could be the
base of something that could get into core. I've based my work in both
the actual generic CBV and how the admin treats inlines. Should open a
ticket for this?

I would appreciate help with documentation; English and documentation
are not my forte.

Apart from this we could get some other Mixins and CBV into core. Ideas?

Another thing I think is reaaally important is better CBV
documentation. Most people I've talked about CBV agrees that the
documentation is not enough and that one has to dig into the code to
figure out how everything works and what to override. Russ has just
said it's very improvable. Django CBVs have been called code ravioli,
and it doesn't help that the documentation isn't that good.

Some ideas might be making a parallel tutorial using CBV, or add a
step where you can rewrite everything as CBV. Another thing I'd like
to see are examples where we override each CBV and different parts of
each, with real life examples. I can help here. Which do you think
would be the best approach?

I'll be online tomorrow at #django-sprint since 8am GMT-3 more or less.

I hope more people is interested in this so that we can work together.

Regards,
Iván

[0] http://www.djangocon.eu/talks/26/
[1] https://github.com/rasca/django-enhanced-cbv
[2] https://github.com/rasca/django-enhanced-cbv/blob/master/enhanced_cbv/views/edit.py

Iván Raskovsky

unread,
Jun 13, 2011, 11:30:30 PM6/13/11
to django-d...@googlegroups.com

I've just filled ticket #16256 [0] and attached the code for the
formsets derived views. If anyone can review it, I can improve the
code later. Thanks!
Iván

[0] https://code.djangoproject.com/ticket/16256

Reply all
Reply to author
Forward
0 new messages