mirror of
https://github.com/StefBuwalda/WebTech.git
synced 2025-10-29 10:49:59 +00:00
main
Setting upload folder to a string with \ as separators caused issues on Linux based OS.
Installation Guide
Setting Up Your Virtual Environment
1. Create a Virtual Environment
To begin, create a virtual environment using the following command:
python -m venv venv
2. Activate the Virtual Environment
For Windows, activate the virtual environment with:
.\venv\Scripts\activate.bat
3. Install Required Packages
Once the environment is activated, install the necessary packages by running:
pip install -r requirements.txt
Setting Up the Database
1. Initialize the Database
To initialize the database, run the following command:
flask --app app.py db init
2. Migrate the Database
Migrate the database schema to the latest version with:
flask --app app.py db migrate
3. Upgrade the Database
Apply the migration to update the database with:
flask --app app.py db upgrade
Seeding the Database
To populate the database with a few sample users and services, run:
python seed.py
Starting the Application
To start the application, run:
python app.py
Development Commands
Updating requirements.txt
To update the requirements.txt with the currently installed packages, use the following command:
pip freeze > requirements.txt
Languages
Python
52.9%
HTML
43.3%
CSS
3.8%