Changes between Initial Version and Version 1 of Ticket #24643
- Timestamp:
- Apr 14, 2015, 3:20:52 PM (10 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #24643 – Description
initial v1 13 13 4. It makes it easier to combine different GCBVs. In case of FormView and CreateView, you don't need to do anything in get() method (in CreateView you may simply init self.object=None at class level), therefore when combining these views with others, you can simply use get() methods from the other View and let get_context_data() handle contexts of all inherited views. 14 14 15 There are two alternatives: form initialization may be removed from get() and post() methods OR it may be left there . In former case it may be a backwards-incompatible change - although get_context_data() is supposed to include a super() call to parent get_context_data() methods, users may have it without the super() call, thenform will disappear from context.15 There are two alternatives: form initialization may be removed from get() and post() methods OR it may be left there along with duplicate logic in get_context_data(). In the former case it may be a backwards-incompatible change - although get_context_data() is supposed to include a super() call to parent get_context_data() methods, users may have it without the super() call -- thus form will disappear from context. 16 16 17 17 If form init is left in get()/post(), it's probably an acceptable performance cost. Perhaps it can be left in but deprecated.