diff --git a/django/db/models/base.py b/django/db/models/base.py
old mode 100644
new mode 100755
diff --git a/django/views/generic/dates.py b/django/views/generic/dates.py
index dc1f6e3..50726f5 100644
a
|
b
|
class BaseDateListView(MultipleObjectMixin, DateMixin, View):
|
186 | 186 | Get a queryset properly filtered according to `allow_future` and any |
187 | 187 | extra lookup kwargs. |
188 | 188 | """ |
189 | | qs = self.get_queryset().filter(**lookup) |
| 189 | qs = self.get_query_set().filter(**lookup) |
190 | 190 | date_field = self.get_date_field() |
191 | 191 | allow_future = self.get_allow_future() |
192 | 192 | allow_empty = self.get_allow_empty() |
… |
… |
class BaseDayArchiveView(YearMixin, MonthMixin, DayMixin, BaseDateListView):
|
404 | 404 | """ |
405 | 405 | date_field = self.get_date_field() |
406 | 406 | |
407 | | field = self.get_queryset().model._meta.get_field(date_field) |
| 407 | field = self.get_query_set().model._meta.get_field(date_field) |
408 | 408 | lookup_kwargs = _date_lookup_for_field(field, date) |
409 | 409 | |
410 | 410 | qs = self.get_dated_queryset(**lookup_kwargs) |
… |
… |
class BaseDateDetailView(YearMixin, MonthMixin, DayMixin, DateMixin, BaseDetailV
|
460 | 460 | month, self.get_month_format(), |
461 | 461 | day, self.get_day_format()) |
462 | 462 | |
463 | | qs = self.get_queryset() |
| 463 | qs = self.get_query_set() |
464 | 464 | |
465 | 465 | if not self.get_allow_future() and date > datetime.date.today(): |
466 | 466 | raise Http404(_(u"Future %(verbose_name_plural)s not available because %(class_name)s.allow_future is False.") % { |
… |
… |
def _get_next_prev_month(generic_view, naive_result, is_previous, use_first_day)
|
564 | 564 | lookup = {'%s__gte' % date_field: naive_result} |
565 | 565 | ordering = date_field |
566 | 566 | |
567 | | qs = generic_view.get_queryset().filter(**lookup).order_by(ordering) |
| 567 | qs = generic_view.get_query_set().filter(**lookup).order_by(ordering) |
568 | 568 | |
569 | 569 | # Snag the first object from the queryset; if it doesn't exist that |
570 | 570 | # means there's no next/previous link available. |
diff --git a/django/views/generic/detail.py b/django/views/generic/detail.py
index 0495db0..68c25e2 100644
a
|
b
|
class SingleObjectMixin(object):
|
26 | 26 | # Use a custom queryset if provided; this is required for subclasses |
27 | 27 | # like DateDetailView |
28 | 28 | if queryset is None: |
29 | | queryset = self.get_queryset() |
| 29 | queryset = self.get_query_set() |
30 | 30 | |
31 | 31 | # Next, try looking up by primary key. |
32 | 32 | pk = self.kwargs.get('pk', None) |
… |
… |
class SingleObjectMixin(object):
|
52 | 52 | {'verbose_name': queryset.model._meta.verbose_name}) |
53 | 53 | return obj |
54 | 54 | |
55 | | def get_queryset(self): |
| 55 | def get_query_set(self): |
56 | 56 | """ |
57 | 57 | Get the queryset to look an object up against. May not be called if |
58 | 58 | `get_object` is overridden. |
diff --git a/django/views/generic/edit.py b/django/views/generic/edit.py
index ff87f7b..a5f037b 100644
a
|
b
|
class ModelFormMixin(FormMixin, SingleObjectMixin):
|
85 | 85 | else: |
86 | 86 | # Try to get a queryset and extract the model class |
87 | 87 | # from that |
88 | | model = self.get_queryset().model |
| 88 | model = self.get_query_set().model |
89 | 89 | return model_forms.modelform_factory(model) |
90 | 90 | |
91 | 91 | def get_form_kwargs(self): |
diff --git a/django/views/generic/list.py b/django/views/generic/list.py
index c50c055..95d83c8 100644
a
|
b
|
class MultipleObjectMixin(object):
|
16 | 16 | context_object_name = None |
17 | 17 | paginator_class = Paginator |
18 | 18 | |
19 | | def get_queryset(self): |
| 19 | def get_query_set(self): |
20 | 20 | """ |
21 | 21 | Get the list of items for this view. This must be an interable, and may |
22 | 22 | be a queryset (in which qs-specific behavior will be enabled). |
… |
… |
class MultipleObjectMixin(object):
|
113 | 113 | |
114 | 114 | class BaseListView(MultipleObjectMixin, View): |
115 | 115 | def get(self, request, *args, **kwargs): |
116 | | self.object_list = self.get_queryset() |
| 116 | self.object_list = self.get_query_set() |
117 | 117 | allow_empty = self.get_allow_empty() |
118 | 118 | if not allow_empty and len(self.object_list) == 0: |
119 | 119 | raise Http404(_(u"Empty list and '%(class_name)s.allow_empty' is False.") |