Changes between Initial Version and Version 1 of Ticket #24643


Ignore:
Timestamp:
Apr 14, 2015, 3:20:52 PM (9 years ago)
Author:
andrei kulakov
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #24643 – Description

    initial v1  
    13134. 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.
    1414
    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, then form will disappear from context.
     15There 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.
    1616
    1717If form init is left in get()/post(), it's probably an acceptable performance cost. Perhaps it can be left in but deprecated.
Back to Top