This page is a quick reference for all of the commands that are used to manage the application.
The setup
command loads the website configuration and creates the database. It can only be run once (unless the database
is manually deleted). If you need to change a running system then you will need to use the reset
command instead.
The command is executed by typing:
flask --debug setup [path_to_configuration]
The reset
command reloads the website configuration and resets the database after the setup
command has been run.
This command can be used when:
Note: This is a destructive operation that will delete all the database content and any exported files in the original export location. You will be asked to confirm that you want to run the operation before the script will execute.
The command is executed by typing:
flask --debug reset [path_to_configuration]
The run
command starts a test server provided by flask. This should not be used in a production system. The Flask
project provides guidance on deploying the application in production.
The run
command is executed by typing (changing the port number to the port number you want to use):
flask --debug run --port=5001
The database can be exported with the export command. The location where the zip file will be created can be set in the exportPathLocation key in the configuration file.
The data in the database can be exported using the following command. This will export the database as a zip file of
.csv
files.
flask --debug export
To export to a .tsv
files rather than .csv
files the format
argument can be added to the command.
flask --debug export --format=tsv