[patch] generic views should accept `manipulator` parameter
|Reported by:||Owned by:||Jacob|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
I'd like to be able to pass a Manipulator object into the generic views. This allows a very nice code pattern:
- the view function handles fetching the required data and doing sanity checks, creates a manipulator and calls the generic view
- the generic view handles all the ugly http and form processing, eventually calling the manipulator
- the manipulator does all the customized field stuff (additional/modified fields)
Sometimes this needs to pass special parameters to the initializer of the manipulator (e.g., a
ChangeManipulator) must prepopulate default values dependent on the some other parameter of the view).
I think this makes a great general pattern. I'm willing to put something up in the wiki if you're interested.