diff --git a/src/documents/filters.py b/src/documents/filters.py index 2ed7f29db..902cca2c3 100644 --- a/src/documents/filters.py +++ b/src/documents/filters.py @@ -5,7 +5,7 @@ from .models import Correspondent, Document, Tag class CorrespondentFilterSet(FilterSet): - class Meta(object): + class Meta: model = Correspondent fields = { "name": [ @@ -18,7 +18,7 @@ class CorrespondentFilterSet(FilterSet): class TagFilterSet(FilterSet): - class Meta(object): + class Meta: model = Tag fields = { "name": [ @@ -50,7 +50,7 @@ class DocumentFilterSet(FilterSet): lookup_expr='isnull', distinct=True) - class Meta(object): + class Meta: model = Document fields = { "title": [ diff --git a/src/documents/serialisers.py b/src/documents/serialisers.py index 504999276..f71a0c5ab 100644 --- a/src/documents/serialisers.py +++ b/src/documents/serialisers.py @@ -5,14 +5,14 @@ from .models import Correspondent, Tag, Document, Log class CorrespondentSerializer(serializers.HyperlinkedModelSerializer): - class Meta(object): + class Meta: model = Correspondent fields = ("id", "slug", "name") class TagSerializer(serializers.HyperlinkedModelSerializer): - class Meta(object): + class Meta: model = Tag fields = ( "id", "slug", "name", "colour", "match", "matching_algorithm") @@ -34,7 +34,7 @@ class DocumentSerializer(serializers.ModelSerializer): view_name="drf:correspondent-detail", allow_null=True) tags = TagsField(view_name="drf:tag-detail", many=True) - class Meta(object): + class Meta: model = Document fields = ( "id", @@ -57,7 +57,7 @@ class LogSerializer(serializers.ModelSerializer): time = serializers.DateTimeField() messages = serializers.CharField() - class Meta(object): + class Meta: model = Log fields = ( "time",