Skip to content

Commit

Permalink
update API with new model name Cliopatria
Browse files Browse the repository at this point in the history
  • Loading branch information
edwardchalstrey1 committed Jul 26, 2024
1 parent 7866eb9 commit c013fee
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
7 changes: 4 additions & 3 deletions seshat/apps/seshat_api/filters/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
SeshatCommentPart,
ScpThroughCtn,
Religion,
VideoShapefile,
Cliopatria,
GADMShapefile,
GADMCountries,
GADMProvinces,
Expand Down Expand Up @@ -284,9 +284,9 @@ class Meta:
}


class VideoShapefileFilter(django_filters.FilterSet):
class CliopatriaFilter(django_filters.FilterSet):
class Meta:
model = VideoShapefile
model = Cliopatria
fields = {
"name": ["icontains", "exact"],
"wikipedia_name": ["icontains", "exact"],
Expand All @@ -299,6 +299,7 @@ class Meta:
"colour": ["icontains", "exact"],
"components": ["icontains", "exact"],
"member_of": ["icontains", "exact"],
"confidence": ["lte", "gte", "exact"],
}


Expand Down
4 changes: 2 additions & 2 deletions seshat/apps/seshat_api/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
SeshatCommentPart,
ScpThroughCtn,
Religion,
VideoShapefile,
Cliopatria,
GADMShapefile,
GADMCountries,
GADMProvinces,
Expand Down Expand Up @@ -254,7 +254,7 @@
"SeshatCommentPart",
"ScpThroughCtn",
"Religion",
"VideoShapefile",
"Cliopatria",
"GADMShapefile",
"GADMCountries",
"GADMProvinces",
Expand Down
4 changes: 2 additions & 2 deletions seshat/apps/seshat_api/views/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
SeshatCommentPartFilter,
ScpThroughCtnFilter,
ReligionFilter,
VideoShapefileFilter,
CliopatriaFilter,
GADMShapefileFilter,
GADMCountriesFilter,
GADMProvincesFilter,
Expand Down Expand Up @@ -349,7 +349,7 @@ class CliopatriaViewSet(

model = Cliopatria
pagination_class = SeshatAPIRestrictedPagination
filterset_class = VideoShapefileFilter
filterset_class = CliopatriaFilter


class GADMShapefileViewSet(
Expand Down

0 comments on commit c013fee

Please sign in to comment.