Changes between Version 1 and Version 2 of Ticket #30698
- Timestamp:
- Aug 11, 2019, 4:18:51 AM (5 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #30698 – Description
v1 v2 1 Hi. 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 1 3 {{{#!python 2 4 class SingleObjectMixin(ContextMixin): … … 23 25 }}} 24 26 25 **Hi,,, 27 I think, it's better idea to implement `SingleObjectMixin.get_context_data` and `BaseDetailView.get` like this. Code below 26 28 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 below28 **29 29 {{{#!python 30 30 class SingleObjectMixin(ContextMixin):