Skip to content
Snippets Groups Projects
Commit fc394ce5 authored by Bastien Abadie's avatar Bastien Abadie
Browse files

Merge branch 'metadata-type-docs' into 'master'

Add metatype docs

See merge request !680
parents 5084f544 8c26e701
No related branches found
No related tags found
1 merge request!680Add metatype docs
......@@ -765,7 +765,18 @@ class RegionBulkCreate(CreateAPIView, UpdateAPIView):
class ElementMetadata(CreateAPIView):
"""
Create a medadata on an existing element
Create a metadata on an existing element.
The `date` type allows dates to be parsed and indexed for search APIs. The supported date formats are as follows:
* `YYYY`: `1995` (recommended)
* `YYYY-MM`: `1995-02` (recommended)
* `YYYY-MM-DD`: `1995-02-16` (recommended)
* `/YYYY(.*)month/`: `1995, february`, with months in French or English (case-insensitive)
* `YYYY-YYYY`: `1995-1996` (yields a date interval)
The `reference` type is also indexed in search APIs and allows searching by
known identifiers or references, or any arbitrary string.
"""
permission_classes = (IsVerified, )
serializer_class = MetaDataUpdateSerializer
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment