mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-04-02 13:45:10 -05:00
Remove old Python 2.x style code
This commit is contained in:
parent
39afe41f08
commit
729f005600
@ -5,7 +5,7 @@ from .models import Correspondent, Document, Tag
|
|||||||
|
|
||||||
class CorrespondentFilterSet(FilterSet):
|
class CorrespondentFilterSet(FilterSet):
|
||||||
|
|
||||||
class Meta(object):
|
class Meta:
|
||||||
model = Correspondent
|
model = Correspondent
|
||||||
fields = {
|
fields = {
|
||||||
"name": [
|
"name": [
|
||||||
@ -18,7 +18,7 @@ class CorrespondentFilterSet(FilterSet):
|
|||||||
|
|
||||||
class TagFilterSet(FilterSet):
|
class TagFilterSet(FilterSet):
|
||||||
|
|
||||||
class Meta(object):
|
class Meta:
|
||||||
model = Tag
|
model = Tag
|
||||||
fields = {
|
fields = {
|
||||||
"name": [
|
"name": [
|
||||||
@ -50,7 +50,7 @@ class DocumentFilterSet(FilterSet):
|
|||||||
lookup_expr='isnull',
|
lookup_expr='isnull',
|
||||||
distinct=True)
|
distinct=True)
|
||||||
|
|
||||||
class Meta(object):
|
class Meta:
|
||||||
model = Document
|
model = Document
|
||||||
fields = {
|
fields = {
|
||||||
"title": [
|
"title": [
|
||||||
|
@ -5,14 +5,14 @@ from .models import Correspondent, Tag, Document, Log
|
|||||||
|
|
||||||
class CorrespondentSerializer(serializers.HyperlinkedModelSerializer):
|
class CorrespondentSerializer(serializers.HyperlinkedModelSerializer):
|
||||||
|
|
||||||
class Meta(object):
|
class Meta:
|
||||||
model = Correspondent
|
model = Correspondent
|
||||||
fields = ("id", "slug", "name")
|
fields = ("id", "slug", "name")
|
||||||
|
|
||||||
|
|
||||||
class TagSerializer(serializers.HyperlinkedModelSerializer):
|
class TagSerializer(serializers.HyperlinkedModelSerializer):
|
||||||
|
|
||||||
class Meta(object):
|
class Meta:
|
||||||
model = Tag
|
model = Tag
|
||||||
fields = (
|
fields = (
|
||||||
"id", "slug", "name", "colour", "match", "matching_algorithm")
|
"id", "slug", "name", "colour", "match", "matching_algorithm")
|
||||||
@ -34,7 +34,7 @@ class DocumentSerializer(serializers.ModelSerializer):
|
|||||||
view_name="drf:correspondent-detail", allow_null=True)
|
view_name="drf:correspondent-detail", allow_null=True)
|
||||||
tags = TagsField(view_name="drf:tag-detail", many=True)
|
tags = TagsField(view_name="drf:tag-detail", many=True)
|
||||||
|
|
||||||
class Meta(object):
|
class Meta:
|
||||||
model = Document
|
model = Document
|
||||||
fields = (
|
fields = (
|
||||||
"id",
|
"id",
|
||||||
@ -57,7 +57,7 @@ class LogSerializer(serializers.ModelSerializer):
|
|||||||
time = serializers.DateTimeField()
|
time = serializers.DateTimeField()
|
||||||
messages = serializers.CharField()
|
messages = serializers.CharField()
|
||||||
|
|
||||||
class Meta(object):
|
class Meta:
|
||||||
model = Log
|
model = Log
|
||||||
fields = (
|
fields = (
|
||||||
"time",
|
"time",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user