https://github.com/hdaojin/itnsa
A web application using Flask
https://github.com/hdaojin/itnsa
flask web
Last synced: about 1 month ago
JSON representation
A web application using Flask
- Host: GitHub
- URL: https://github.com/hdaojin/itnsa
- Owner: hdaojin
- License: gpl-3.0
- Created: 2023-11-13T05:52:04.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-12-09T06:32:03.000Z (over 1 year ago)
- Last Synced: 2024-12-09T07:29:47.813Z (over 1 year ago)
- Topics: flask, web
- Language: Python
- Homepage:
- Size: 313 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Flask Web Application Project
A web application using Flask.
## How to use
### Installation
```bash
# Clone the repository
git clone https://github.com/hdaojin/itnsa.git
cd itnsa
# Create a virtual environment
python3 -m venv .venv
# Activate the virtual environment (Linux, macOS)
source .venv/bin/activate
# Activate the virtual environment (Windows)
.venv\Scripts\activate
# Install the requirements
pip install -r requirements.txt
```
### Configuration
```bash
# Set the default configuration of the application
vim config.py
# Generate a secret key
python utils/gen_seckey.py
# Set the environment variables
cp .env_simple .env
vim .env
```
### Run the application
```bash
# Run the application
flask --app itnsa --debug run
```
### Initial setup
Initialize the database using flask-migrate:
```bash
# flask --app itnsa db init
# flask --app itnsa db migrate -m "init"
flask --app itnsa db upgrade
```
Import the default data using the following commands:
```bash
flask --app itnsa init-app
flask --app itnsa add-admin
```