https://github.com/wanmnr/flask-voting
IN-PROGRESS - Flask
https://github.com/wanmnr/flask-voting
flask jinja2
Last synced: 5 months ago
JSON representation
IN-PROGRESS - Flask
- Host: GitHub
- URL: https://github.com/wanmnr/flask-voting
- Owner: wanmnr
- License: apache-2.0
- Created: 2024-11-01T10:09:11.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-11-19T16:04:58.000Z (over 1 year ago)
- Last Synced: 2025-10-19T06:52:25.421Z (9 months ago)
- Topics: flask, jinja2
- Language: Python
- Homepage:
- Size: 248 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Flask Application
A Flask web application with asset management and other features.
## Requirements
- Python 3.8+
- pipenv
## Installation
1. Clone the repository:
```bash
git clone
cd
```
## Install pipenv if you haven't
```bash
pip install pipenv
```
## Install dependencies and create virtual environment
```bash
pipenv install
```
## Activate virtual environment
```bash
pipenv shell
```
## Edit .env file with your configurations
```bash
touch .env
```
## Run the Flask development server:
```bash
flask run
```
## Access the application at:
```bash
http://127.0.0.1:5000
```
## Asset Management
The application uses Flask-Assets for managing and minifying CSS/JavaScript files.
### Asset Commands
#### Build and minify assets:
```bash
flask assets build
```
#### Remove built assets:
```bash
flask assets clean
```
#### Watch assets for changes during development:
```bash
flask assets watch
```
## DB Related
### For first-time setup:
```bash
flask db create
flask db init
```
### For complete reset:
```bash
flask db recreate # This now includes initialization
```
#### 1. Create database tables
```bash
flask db create
```
#### 2. Initialize with default data
```bash
flask db init
```
#### For cleanup/reset:
```bash
flask db drop
```
#### For reset and recreate:
```bash
flask db recreate
```
## Deployment
### For production deployment:
#### Set production environment:
```bash
export FLASK_ENV=production
```
#### Run using a production server:
```bash
gunicorn wsgi:app
```
## License