/flask-test

Primary LanguagePython

recurse-quiz-app

Table of Contents (Optional)

If your README is long, add a table of contents to make it easy for users to find what they need.

Installation

  1. Install python & pipenv
  • pip installation might be required as well
  1. To enter the virtual environment

    pipenv shell
  2. To install the required dependencies:

    pipenv install -r requirements.txt

TODO: Add commands for upgrading the database & seeding

  1. Create a .env file in the recurse-quiz-app directory and enter this on the first line
    SECRET_KEY=randomcharacters
  2. To start the server use command line:
    python3 wsgi.py

Notes over structure

Example Image

Common Issues

In case of Pylance import errors on VSCode, try:

  1. Run:
    • Open the command palette
    • Go to Python Clear Cache and Reload
  2. Run:
    • pipenv --venv
    • Open the command palette
    • Go to Python Select Interpreter
    • Then manually enter the interpreter path as the Python interpreter
    • This is in the command palette on VSCode

The above is also true for if Pycharm notifies you that there is no python interpreter configured! To solve via the Pycharm GUI:

  1. Get the location of your pipenv virtual environment by running 'pipenv --venv'
  2. Click configure python interpreter
  3. Click add New interpreter
  4. Click add local interpreter
  5. Click the 'Existing' radio buton, then the ... icon.
  6. Paste the location of the pipenv virtual environment
  7. Look for the bin folder to your corresponding virtual environment
  8. Select the file which corresponds to your version of python (for this case, python3.9) and hit OK