This is a demo Flask website that includes a login page.
In order to log in, the username is admin and the password is admin.
- Python 3.9 or newer
- pip
-
Clone or download this repository:
git clone https://github.com/sdhutchins/flask-demo.git cd flask-demo -
Create a virtual environment (recommended):
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install dependencies:
pip install -r requirements.txt
-
(Optional) Create a
.envfile for environment variables:FLASK_DEBUG=True SECRET_KEY=your-secret-key-here
If no
.envfile is present, the app will use default values.
Run the application using one of the following methods:
python run.pyflask runThe application will be available at http://localhost:5000/.
Run tests with pytest:
pytestRun tests with coverage report:
pytest --cov=app --cov-report=htmlView the HTML coverage report by opening htmlcov/index.html in your browser.
- Add example for setting up a database.
- Update css to Bootstrap 4.