<commit_before>from django.db import models
from django_filters import FilterSet, IsoDateTimeFilter

from astrobin.models import Image, ImageRevision


class ImageRevisionFilter(FilterSet):
    class Meta:
        model = ImageRevision
        fields = {
            'uploaded': ('lt', 'lte', 'exact', 'gt', 'gte'),
        }

    filter_overrides = {
        models.DateTimeField: {
            'filter_class': IsoDateTimeFilter
        },
    }
<commit_msg>(api/v2) Enable filtering revisions by image id<commit_after>from django.db import models
from django_filters import FilterSet, IsoDateTimeFilter

from astrobin.models import Image, ImageRevision


class ImageRevisionFilter(FilterSet):
    class Meta:
        model = ImageRevision
        fields = {
            'uploaded': ('lt', 'lte', 'exact', 'gt', 'gte'),
            'image': ('exact',),
        }

    filter_overrides = {
        models.DateTimeField: {
            'filter_class': IsoDateTimeFilter
        },
    }

{'fraction_non_alphanumeric': 0.10558375634517767, 'fraction_numerical': 0.0010152284263959391, 'mean_word_length': 2.6791044776119404, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3312060', 'n_tokens_mistral': 286, 'n_tokens_neox': 273, 'n_words': 70}