diff options
Diffstat (limited to 'app/trading')
-rw-r--r-- | app/trading/views.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/app/trading/views.py b/app/trading/views.py index 3bb64cf..5cdcf29 100644 --- a/app/trading/views.py +++ b/app/trading/views.py @@ -30,7 +30,10 @@ class LuxTradeListView(PaginatedListView): def get_queryset(self): queryset = super(LuxTradeListView, self).get_queryset() - return queryset.filter(status=1) + queryset = queryset.filter(status=1) + start_date = datetime.date(timezone.now().year, 1, 1) + end_date = datetime.date(timezone.now().year, 12, 31) + return self.filter(close_date__range=(start_date, end_date)) class LuxTradeDetailView(UpdateView): |