biocore / redbiom

Sample search by metadata and features
Other
44 stars 20 forks source link

ENH: allow for storing timestamps #82

Closed wasade closed 5 years ago

wasade commented 5 years ago

This PR allows administrators to denote a timestamp. The timestamps are stored in perpetuity in a list, where new timestamps are prepended. An administrator may choose to use this to denote database creation and update times by interpreting index 0 as the latest update and index -1 as the point of database creation.

wasade commented 5 years ago

@antgonza, this will allow for timestamps. For Qiita, the following would be a plausible solution to have a valid str to display on the UI

timestamps = redbiom.admin.get_timestamps()
if timestamps:
    latest = timestamps[0]
else:
    latest = 'Not reported'