By default there exists an option to show the metadata of individual Dataset_File s in the default Dataset view. Some kinds of files allow for rich and useful visualisation and/or processing. For this purpose there exist contextual views, views that are available depending on the type of file they refer to.
A default installation has no contextual views. To enable them a few steps are needed:
DATAFILE_VIEWS = [("http://example.org/views/awesome_view", "/apps/awesome-view/view"),]
Currently, the default view is always Dataset_File metadata. This can be changed, for example, by developing a custom Dataset view, which is explained in the following chapter.
For some specific uses the data available can be presented and/or processed in useful ways. The example that this feature was built for are single-image and many-image datasets from the Australian Synchrotron. Single images can be displayed large and for a many-image dataset it is more useful to show a couple of example images taken at regular intervals not from the beginning of the set of files. These different datasets can be tagged differently and subsequently displayed differently.
Similarly to contextual Dataset_File views, Dataset and Experiment views rely on specific schemas attached to them.
The schema for each view either needs to be created and attached to a Dataset, or the view can be set up for Dataset schemas that are already in use.
There are two main differences:
instead of an AJAX-loaded URL the settings associate a view function with a schema.
DATASET_VIEWS = [ ("http://example.org/awesome_data/1", "tardis.apps.mx_views.views.view_full_dataset"), ] EXPERIMENT_VIEWS = [ ("http://example.org/awesome_experiments/1", "tardis.apps.mx_views.views.view_fancy_experiment"), ]
The default and well-tested Dataset and Experiment views can be changed minimally for specific purposes by extending the default template and overriding a template block.
New versions may change the default view functions. If you copy and paste them for your application, please check with each upgrade that you are still using up to date code.
Work in progress