Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

New approach for Django > 1.2.4 compatibility. Simply ignore the damn…

… argument.
  • Loading branch information...
commit 0d320a0732ec59949380d4b5f21e153174d3ecf7 1 parent 079f488
@piquadrat piquadrat authored committed
Showing with 5 additions and 2 deletions.
  1. +5 −2 multilingual/query.py
View
7 multilingual/query.py
@@ -77,10 +77,13 @@ def clone(self, klass=None, **kwargs):
return super(MultilingualQuery, self).clone(klass=klass, **defaults)
def add_filter(self, filter_expr, connector=AND, negate=False, trim=False,
- can_reuse=None, process_extras=True):
+ can_reuse=None, process_extras=True, force_having=False):
"""
Copied from add_filter to generate WHERES for translation fields.
"""
+ if force_having:
+ import warnings
+ warnings.warn("multilingual-ng doesn't support force_having (see Django ticket #11293)")
arg, value = filter_expr
parts = arg.split(LOOKUP_SEP)
if not parts:
@@ -596,4 +599,4 @@ def values_list(self, *fields, **kwargs):
for field in fields:
if field not in self._get_all_field_names():
raise NotImplementedError("Multilingual fields cannot be queried using queryset.values(...)")
- return super(MultilingualModelQuerySet, self).values_list(*fields, **kwargs)
+ return super(MultilingualModelQuerySet, self).values_list(*fields, **kwargs)
Please sign in to comment.
Something went wrong with that request. Please try again.