Settings

The application includes a settings module with several settings with default values. If you don’t need to change them, you can just take the defaults from this module.

For more information on setting up the settings you need, see here.

libfjordweb.settings.ALLOWED_CSV_CONTENT_TYPES = ['text/csv', 'application/octet-stream']

Allowed types for CSV files

libfjordweb.settings.ALLOWED_CSV_EXTENSIONS = ['.csv']

Allowed file extensions for CSV files

libfjordweb.settings.ALLOWED_JSON_CONTENT_TYPES = ['application/json', 'application/octet-stream']

Allowed types for JSON files

libfjordweb.settings.ALLOWED_JSON_EXTENSIONS = ['.json']

Allowed file extensions for JSON files

libfjordweb.settings.ALLOWED_SPREADSHEET_CONTENT_TYPES = ['application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 'application/octet-stream', 'application/vnd.oasis.opendocument.spreadsheet', 'application/octet-stream']

Allowed types for Spreadsheet files (sum of Excel and Open Document)

libfjordweb.settings.ALLOWED_SPREADSHEET_EXCEL_CONTENT_TYPES = ['application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 'application/octet-stream']

Allowed types for Excel files

libfjordweb.settings.ALLOWED_SPREADSHEET_EXCEL_EXTENSIONS = ['.xlsx']

Allowed file extensions for Excel files

libfjordweb.settings.ALLOWED_SPREADSHEET_EXTENSIONS = ['.xlsx', '.ods']

Allowed file extensions for Spreadsheet files (sum of Excel and Open Document)

libfjordweb.settings.ALLOWED_SPREADSHEET_OPENDOCUMENT_CONTENT_TYPES = ['application/vnd.oasis.opendocument.spreadsheet', 'application/octet-stream']

Allowed types for Open Document files

libfjordweb.settings.ALLOWED_SPREADSHEET_OPENDOCUMENT_EXTENSIONS = ['.ods']

Allowed file extensions for Open Document files

libfjordweb.settings.ALLOWED_UNKNOWN_CONTENT_TYPES = ['application/octet-stream']

Sometimes uploads happen with a generic content type. In this case, we can’t rely on content type to detect type. But the type is still allowed. Define these generic content-types in a handy variable so we can also add them to all the ALLOWED_*_CONTENT_TYPES settings.

libfjordweb.settings.DELETE_FILES_AFTER_DAYS = 7

Uploaded data is deleted after a certain number of days to protect privacy, leaving only meta data for usage analysis. Should be an integer of the number of days.

libfjordweb.settings.GOOGLE_ANALYTICS_ID = ''

Details for Google Analytics tracking, if wanted. Should be a string of the id.

libfjordweb.settings.PIWIK = {'dimension_map': {}, 'site_id': '', 'url': ''}

Details for Piwik/Matamo tracking, if wanted. Should be a dictionary with the following keys: url, site_id and dimension_map