import django_filters

from django_filters import rest_framework as filters


from django_rv_apps.apps.believe_his_prophets.models.book import Book

from django_rv_apps.apps.believe_his_prophets.models.bible_read import BibleRead


class BibleReadFilter(django_filters.FilterSet):

    book = filters.ModelChoiceFilter(
        queryset=Book.objects.all())

    class Meta:
        model = BibleRead
        fields = ('id', 'book', 'start_date')

@@ -223,16 +223,50 @@
 bleRead%0A
+from django.utils import timezone%0A
 %0A%0Aclass 
@@ -384,16 +384,76 @@
 .all())%0A
+    start_date = filters.DateFilter(method='filter_date')%0A%0A%0A
 %0A    cla
@@ -525,16 +525,254 @@
 , 'start_date')%0A
+%0A    def filter_date(self, queryset, value):%0A        t = timezone.localtime(timezone.now())%0A        return queryset.filter(%0A            start_date__year = t.year,%0A            start_date__month = t.month, start_date__day = t.day,%0A        )

update filter