Changes between Version 1 and Version 2 of Ticket #30698


Ignore:
Timestamp:
Aug 11, 2019, 4:18:51 AM (5 years ago)
Author:
Davit Gachechiladze
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #30698 – Description

    v1 v2  
     1Hi. In `BaseDetailView.get(self, request, *args, **kwargs)`, we have line like `context = self.get_context_data(object=self.object)`. Why should we pass `object=self.object` ? It's redundant (IMHO).
     2
    13{{{#!python
    24class SingleObjectMixin(ContextMixin):
     
    2325}}}
    2426
    25 **Hi,,,
     27I think, it's better idea to implement `SingleObjectMixin.get_context_data` and `BaseDetailView.get` like this. Code below
    2628
    27 In `BaseDetailView.get(self, request, *args, **kwargs)`, we have line like `context = self.get_context_data(object=self.object)`. Why should we pass `object=self.object` ? It's redundant (IMHO). I think, it's better idea to implement `SingleObjectMixin.get_context_data` and `BaseDetailView.get` like this. Code below
    28 **
    2929{{{#!python
    3030class SingleObjectMixin(ContextMixin):
Back to Top