Update docs

This commit is contained in:
Itai Shirav 2018-04-07 15:20:33 +03:00
parent 31ee58967f
commit cd8d82c226
3 changed files with 12 additions and 6 deletions

View File

@ -1,6 +1,11 @@
Change Log
==========
Unreleased
----------
- Add support for compound filters with Q objects (desile)
- Add support for BETWEEN operator (desile)
v0.9.8
------
- Bug fix: add field names list explicitly to Database.insert method (anci)

View File

@ -605,16 +605,17 @@ Adds a DISTINCT clause to the query, meaning that any duplicate rows
in the results will be omitted.
#### exclude(**kwargs)
#### exclude(**filter_fields)
Returns a copy of this queryset that excludes all rows matching the conditions.
#### filter(**kwargs)
#### filter(*q, **filter_fields)
Returns a copy of this queryset that includes only rows matching the conditions.
Add q object to query if it specified.
#### only(*field_names)
@ -705,16 +706,17 @@ Adds a DISTINCT clause to the query, meaning that any duplicate rows
in the results will be omitted.
#### exclude(**kwargs)
#### exclude(**filter_fields)
Returns a copy of this queryset that excludes all rows matching the conditions.
#### filter(**kwargs)
#### filter(*q, **filter_fields)
Returns a copy of this queryset that includes only rows matching the conditions.
Add q object to query if it specified.
#### group_by(*args)

View File

@ -7,7 +7,6 @@ from .utils import comma_join
# TODO
# - and/or between Q objects
# - check that field names are valid
# - operators for arrays: length, has, empty
@ -120,7 +119,7 @@ class BetweenOperator(Operator):
value1 = field.to_db_string(
field.to_python(value[1], pytz.utc)) if value[1] is not None or len(str(value[1])) > 0 else None
if value0 and value1:
return '%s BETWEEN %s and %s' % (field_name, value0, value1)
return '%s BETWEEN %s AND %s' % (field_name, value0, value1)
if value0 and not value1:
return ' '.join([field_name, '>=', value0])
if value1 and not value0: