Changes between Initial Version and Version 1 of Ticket #24911
- Timestamp:
- Jun 3, 2015, 6:17:24 PM (9 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #24911 – Description
initial v1 1 QuerySet is initiated with model=Noneas named argument a.k.a. kwarg:1 QuerySet is initiated with {{{model=None}}} as named argument a.k.a. kwarg: 2 2 {{{ 3 3 class QuerySet(object): 4 4 def __init__(self, model=None, query=None, using=None, hints=None): 5 5 }}} 6 But it is called in get_querysetas positional argument a.k.a. arg:6 But it is called in {{{get_queryset()}}} as positional argument a.k.a. arg: 7 7 {{{ 8 8 def get_queryset(self): 9 9 return self._queryset_class(self.model, using=self._db, hints=self._hints) 10 10 }}} 11 This causes trouble when overriding get_queryset (which is the idea behind the method) and using super(BlaBlaManager, self).get_queryset()which returns a non-standard queryset-class, where model is not necessarily the first argument, which should have been okay as model is a named argument.11 This causes trouble when overriding {{{get_queryset}}} (which is the idea behind the method) and using {{{super(BlaBlaManager, self).get_queryset()}}} which returns a non-standard queryset-class, where model is not necessarily the first argument, which should have been okay as model is a named argument. 12 12 13 13 Proposed solution: … … 17 17 return self._queryset_class(model=self.model, using=self._db, hints=self._hints) 18 18 }}} 19 20 Github pull request: https://github.com/django/django/pull/4745