from datetime import datetime
from django.db.models import Q
from django_filters import FilterSet, CharFilter
from export_readiness.models import ArticlePage


class ArticlePageFilter(FilterSet):
    after = CharFilter(method='filter_time_id')

    def filter_time_id(self, queryset, name, value):
        value = value or '0.000000_0'
        after_ts_str, after_id_str = value.split('_')
        after_ts = datetime.fromtimestamp(float(after_ts_str))
        after_id = int(after_id_str)
        return queryset.filter(Q(last_published_at=after_ts, id__gt=
            after_id) | Q(last_published_at__gt=after_ts))


    class Meta:
        model = ArticlePage
        fields = ['after']

4c5e416d6a3c767ddf7b8537bdc8c421aa36782b
<mask token>


class ArticlePageFilter(FilterSet):
    <mask token>
    <mask token>


    class Meta:
        model = ArticlePage
        fields = ['after']

<mask token>


class ArticlePageFilter(FilterSet):
    <mask token>

    def filter_time_id(self, queryset, name, value):
        value = value or '0.000000_0'
        after_ts_str, after_id_str = value.split('_')
        after_ts = datetime.fromtimestamp(float(after_ts_str))
        after_id = int(after_id_str)
        return queryset.filter(Q(last_published_at=after_ts, id__gt=
            after_id) | Q(last_published_at__gt=after_ts))


    class Meta:
        model = ArticlePage
        fields = ['after']

<mask token>


class ArticlePageFilter(FilterSet):
    after = CharFilter(method='filter_time_id')

    def filter_time_id(self, queryset, name, value):
        value = value or '0.000000_0'
        after_ts_str, after_id_str = value.split('_')
        after_ts = datetime.fromtimestamp(float(after_ts_str))
        after_id = int(after_id_str)
        return queryset.filter(Q(last_published_at=after_ts, id__gt=
            after_id) | Q(last_published_at__gt=after_ts))


    class Meta:
        model = ArticlePage
        fields = ['after']

from datetime import datetime
from django.db.models import Q
from django_filters import FilterSet, CharFilter
from export_readiness.models import ArticlePage


class ArticlePageFilter(FilterSet):
    after = CharFilter(method='filter_time_id')

    def filter_time_id(self, queryset, name, value):
        value = value or '0.000000_0'
        after_ts_str, after_id_str = value.split('_')
        after_ts = datetime.fromtimestamp(float(after_ts_str))
        after_id = int(after_id_str)
        return queryset.filter(Q(last_published_at=after_ts, id__gt=
            after_id) | Q(last_published_at__gt=after_ts))


    class Meta:
        model = ArticlePage
        fields = ['after']
