You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the SynchroinisedDatastores, we need to store metadata as well as file blobs. It would be good if we could just use a schema, consistent with the upcoming tags template work in twined and Octue SDK, to generate a metadata JSONField that's still queryable but for which the form is automatically created.
django-reactive is pretty good because it allows us to use a json schema to create data in django admin which then can be used to store metadata; maybe base something on this?
from django_reactive.fields import ReactJSONSchemaField
class MyModel(models.Model)
tags = ReactJSONSchemaField(
help_text="Tags enable data to be found using common search tools.",
schema={
"type": "object",
"required": [
"elevation",
"max_latitude",
"max_longitude",
"min_latitude",
"min_longitude",
],
"properties": {
"elevation": {
"type": "number",
"title": "Elevation",
"description": "Height in m above the ground that the wind map is calculated"
},
"max_latitude": {
"type": "number",
"title": "Max Latitude"
},
"max_longitude": {
"type": "number",
"title": "Max Longitude"
},
"min_latitude": {
"type": "number",
"title": "Min Longitude"
},
"min_longitude": {
"type": "number",
"title": "Min Longitude"
},
},
"additionalProperties": True
}
)
Current state
Currently we use the META_FIELDS property to map database columns to metadata but it would be nice to be able to reflect out metadata directly instead of having to manually map it for each file type
The text was updated successfully, but these errors were encountered:
Feature request
Use Case
In the
SynchroinisedDatastore
s, we need to store metadata as well as file blobs. It would be good if we could just use a schema, consistent with the upcoming tags template work in twined and Octue SDK, to generate a metadata JSONField that's still queryable but for which the form is automatically created.django-reactive is pretty good because it allows us to use a json schema to create data in django admin which then can be used to store metadata; maybe base something on this?
Current state
Currently we use the META_FIELDS property to map database columns to metadata but it would be nice to be able to reflect out metadata directly instead of having to manually map it for each file type
The text was updated successfully, but these errors were encountered: