Skip to content

Commit eb2e1a5

Browse files
committed
Make correction to example
1 parent 93fdfbe commit eb2e1a5

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ def get_month_range():
7474
views.py
7575
7676
```python
77+
from django.db.models import F, Aggregate
7778
from django.template.response import TemplateResponse
7879
7980
from .date_utils import get_month_range
@@ -92,7 +93,7 @@ def range_of_visitors_this_month(request):
9293
"""
9394
template = "base.html"
9495
95-
context = Event.objects.filter(period__overlaps=get_month_range()).aggregate(
96+
context = Event.objects.filter(period__overlap=get_month_range()).aggregate(
9697
output=Aggregate(F("potential_visitors"), function="range_merge")
9798
)
9899

django_range_merge/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
Enables the range_merge Aggregate for Django on Postgres
33
"""
44

5-
__version__ = "0.2.5"
5+
__version__ = "0.2.6"
66

77
default_app_config = "django_range_merge.apps.DjangoRangeMergeConfig" # pylint: disable=invalid-name

0 commit comments

Comments
 (0)