Skip to content
This repository has been archived by the owner on Feb 16, 2023. It is now read-only.

pastgift/web-app-template-py

Repository files navigation

Web App Template

A web application project template based on Flask(Python).

About

Welcome to Web App Template project (WAT). This project is aimed to provide the common programming works and let the developers focus on their business logic.

Notice that ths project is NOT a framework or someting else, it's just a semi-finished web app. Copy the project to your workplace and be free to change any code in the project.

WAT is base on Flask, and of course you can use all the original programming APIs provided by Flask.

Features

  • Basic Authentication
    • Password
    • CAPTCHA (With Pillow)
  • User Management
    • Add User
    • Edit User (include Resetting Password)
    • Enable / Disable User
    • Search User
  • ACL Support
  • User Operation Records
    • Search Record
  • Multi-Language (With Flask-Babel)
    • English
    • Simplified Chinese
    • Traditional Chinese
    • Japanese
  • Deploy Ready (With gunicorn, supervisord)

Dependency

See requirements.txt

Envionment Variables

Name Description Default
ADMIN_USERNAME Admin username
SECRET_KEY Flask secret key h3bF9paWv9nNfAEo
WAT_DB_DEV_URL Database connection URL sqlite:///current-path/db-dev.sqlite
WAT_DB_URL Database connection URL For Production sqlite:///current-path/db.sqlite
FLASK_CONFIG Config name (development, production) default (Same to development)

Setup Database

python manage.py initdb

Default Admin User

Email Name Password
$ADMIN_USERNAME admin admin!

Run for development

./manage.py runserver -h localhost -p 9999

Run for production

gunicorn -b localhost:8000 -c gunicorn.conf manage:app

Run for production in supervisord

supervisord

Update Translation

./update-translations.sh

License

MIT

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published