Hi Ben,
I like your implementation, but I don't really like the class name
'View'; I would opt for 'Resource' (or 'ResourceHandle').
Why I don't like 'View':
- It's a very abstract thing, it's conceptually defined as 'the thing
that maps a request to a response', or something alike
- Instances of the class aren't actually views as they aren't callable
- Consider 'MyView.as_view(*args, **kwargs)', which is weird
Why I like 'Resource':
- A resource is conceptually much clearer than a view (IMHO)
- It conforms to standard naming: a URL addresses a resource
- Methods like 'GET', 'POST', 'PUT', 'DELETE' make sense as attributes
of a resource (handle)
- django.resources is shorter than django.class_based_views ;-)
I hope this makes sense, please let me know if it doesn't.
Cheers, Roald
On Oct 5, 2010, at 6:33 PM, Ben Firshman wrote:
Thanks to everyone who's helping push this forward. I would get
stuck in, but I'm bogged down with work at the moment.
A couple of things from the wiki page that need doing:
1) Test coverage probably isn't great. Everything seems to work when
I've used it in applications, but there's probably some stuff in
there that isn't thoroughly tested.
2) Support for ModelForms isn't quite the same as our current
generic views. For edit views, you can specify a model and the form
is optional.
Ben
--
You received this message because you are subscribed to the Google Groups "Django
developers" group.
To post to this group, send email to django-develop...@googlegroups.com.
To unsubscribe from this group, send email to
django-developers+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/django-developers?hl=en.