Generic views for manipulators
|Reported by:||r.pelizzi@…||Owned by:||adrian|
|Severity:||normal||Keywords:||generic view, manipulator|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
As far as i know, there are very handy generic views for creating, updating objects. Their limit is that you have to use them on an object, and they use the object's default manipulator. What if my manipulator doesn't have a related object (e.g. i have a manipulator that creates two objects)? And what if want to use a different manipulator? Since the view code to use the manipulator is essentially the same, this calls for a generic view. Then django can be enhanched in 2 ways:
- Provide a way to assign manipulators to objects to replace the auto-generated one (altough this would mess up the admin i think)
- Provide a generic view which accepts a manipulator rather than an object. We're not even using the original object in the context of the create_object generic view! I could provide one myself, although you could probably write it in 3 seconds and be more consistent with the arguments required.