diff options
author | Kalevi Yypänaho <kyypanah@local> | 2023-11-27 20:55:03 +0200 |
---|---|---|
committer | Kalevi Yypänaho <kyypanah@local> | 2023-11-27 20:55:03 +0200 |
commit | cbfd7ed7fb8c1bf4aefdcf77aa03d806011daf29 (patch) | |
tree | 20f668b774f643e1b472f5b8753c18aba301a81d /README.md | |
parent | d74aca91c689b54b7b49bbfa7121f458f4caf751 (diff) |
DB_URI and SECRET has now defaults in app.py. Added venv install instructions.
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 30 |
1 files changed, 19 insertions, 11 deletions
@@ -3,28 +3,36 @@ TO GET IT RUNNING: -[Note that quide in the course material works as well]<https://hy-tsoha.github.io/materiaali/aikataulu/> - Install postgresql for local user & get it running (as in course material) - $ wget https://github.com/hy-tsoha/local-pg/raw/master/pg-install.sh - $ bash pg-install.sh - $ postrgres & -Install poetry if nessesary. (refer your distro) -- $ pip install --user poetry -- $ pipx install poetry - Clone the source & install poetry dependencies - $ git clone https://github.com/triionhe/kyselma.git - $ cd kyselma -- $ export PYTHON_KEYRING_BACKEND=keyring.backends.fail.Keyring (Just in case..) -- $ poetry install --no-root Get database ready - $ psql < SCHEMA.sql (BE CAREFUL! This drops some tables.) -Start the app in poetry virtual environment -- $ SQLALCHEMY_DATABASE_URI="postgresql:///$USER" SECRET_KEY=29347884 poetry run flask run +Either use (1) poetry or (2) venv to handle dependencies and run the app + +(1) Install poetry if nessesary. (refer your distro) +- $ pip install --user poetry +- $ pipx install poetry +(1) Install dependencies +- $ export PYTHON_KEYRING_BACKEND=keyring.backends.fail.Keyring (Just in case..) +- $ poetry install --no-root +(1) Start the app in poetry virtual environment +- $ poetry run flask run + +(2) Activate venv environment +- $ python3 -m venv venv +- $ source venv/bin/activate +(2) Install dependencies with pip +- $ pip install -r ./requirements.txt +(2) Start the app +- $ flask run Surf to the webpage and start two sessions for better testing - $ firefox http://localhost:5000/ http://127.0.0.1:5000/ @@ -36,6 +44,7 @@ There is ready made kyselmä named 'kysdemo' for testing. DONE: +- Tietoturvaseikat: CSRF suojaus - Eniten ja vähiten yhdenmukaiset vastaajat - Parempi ulkoasu - Vastauksen ja luomisen aloittamisen yksinkertaistaminen @@ -59,7 +68,6 @@ DONE: TODO: - Moderointi -- Tietoturvaseikat? ... Tarkoitus on luoda sivu jossa voi luoda kysymyksiä ja kyselyitä, joita |