A simple implementation for the needs of HFRI institute made with Flask framework (Python) for the backend, Jinja template engine, HTML and CSS styling for the frontend.
Team: Angelos-Nikolaos Kanatas, Georgios Triantafyllis, Ioannis Asprogerakas
sudo apt-get update
sudo apt-get install python3.8
pip3 install -r requirements.txtsudo apt install mysql-server
sudo mysql_secure_installationYou can find more about that here: https://brew.sh/index_el
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew install mysqlbrew install python3
pip3 install -r requirements.txt- Open a terminal and precede the
mysqlcommand withsudoto invoke it with the privileges of the root Ubuntu user in order to gain access to the root MySQL user. This can be done using
sudo mysql -u root -p. - Create a new MySQL user using:
mysql> CREATE USER 'HFRI_admin'@'localhost' IDENTIFIED BY 'admin'; - Grant the user root privileges on the application's database using:
mysql> GRANT ALL PRIVILEGES ON HFRI.* TO 'HFRI_admin'@'localhost' WITH GRANT OPTION; - Reload the grant tables to ensure that the new privileges are put into effect using:
FLUSH PRIVILEGES;. - Exit MySQL with
mysql> exit;. - Go to
HFRI/__init__.pyand change theapp.config["MYSQL_USER"]andapp.config["MYSQL_PASSWORD"]lines according to the username and the password you chose before. - Open the
sqldirectory, typesudo mysql -u root -pandsource schema.sql,source insert-data.sql,source queries.sqlto create the database and pass all the nesessery data for it to work.
If you are using macOS be carefull because Tables_in_HFRI migth be lowercase and that is going to cause some misfunctions. To solve that you have to manually change the variable Tables_in_HFRI -> Tables_in_hfri in the show_tables.html file located in the templates directory.
python3 run.py

