summaryrefslogtreecommitdiff
path: root/archaeological_context_records/views_api.py
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2021-11-24 08:13:12 +0100
committerÉtienne Loks <etienne.loks@iggdrasil.net>2022-12-12 12:20:59 +0100
commitfa4b00372209425b18c57fe9af29a416ce36b39f (patch)
tree2d5197ad3fb0ac78b343732d3251de320ea07f72 /archaeological_context_records/views_api.py
parente3ce9c77d36db4510076b677ec7ce1e0021a51f8 (diff)
downloadIshtar-fa4b00372209425b18c57fe9af29a416ce36b39f.tar.bz2
Ishtar-fa4b00372209425b18c57fe9af29a416ce36b39f.zip
Syndication - api view & url for find, context record, warehouse, container and file
Diffstat (limited to 'archaeological_context_records/views_api.py')
-rw-r--r--archaeological_context_records/views_api.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/archaeological_context_records/views_api.py b/archaeological_context_records/views_api.py
new file mode 100644
index 000000000..8a5d8fbcd
--- /dev/null
+++ b/archaeological_context_records/views_api.py
@@ -0,0 +1,15 @@
+from ishtar_common.rest import SearchAPIView, FacetAPIView, GetAPIView
+from archaeological_context_records import models, forms
+
+
+class FacetContextRecordAPIView(FacetAPIView):
+ models = [models.ContextRecord]
+ select_forms = [forms.RecordSelect]
+
+
+class SearchContextRecordAPI(SearchAPIView):
+ model = models.ContextRecord
+
+
+class GetContextRecordAPI(GetAPIView):
+ model = models.ContextRecord