-
Install python3 and postgresql 12
-
run the following commands in command line:
-
cd path_to_source_code
-
py -3 -m pip install -r requirements.txt
orpython3 -m pip install -r requirements.txt
-
psql -d postgres -U postgres -f db.sql
followed by entering your password
-
-
configure the credential in app.py:
# Config app.config['SQLALCHEMY_DATABASE_URI'] = 'postgresql://{username}:{password}@{host}:{port}/{database}'\ .format( username='<username>', password='<password>', host='localhost', port=<port number>, database='<database_name>' )
replace
<username>
,<password>
,<port>
, and<database>
with the actual configuration from your database. If you are not sure about<port>
and don't recall changing such a value during initial setup or launching of PostgreSQL server, then it should be5432
by default. -
Run
py -m 3 app.py
orpython3 app.py
-
Navigate to
http://127.0.0.1:5000/
in your browser to check if flask is active.
The application comes preloaded with an admin account with the following credentials
username: admin password: password1
and student account with the following credentials:
username: user
password: password