Coder Social home page Coder Social logo

iamjuniorpeter / flask-template-advanced Goto Github PK

View Code? Open in Web Editor NEW

This project forked from kevinqqnj/flask-template-advanced

0.0 1.0 0.0 68 KB

an advanced Flask app template, integrated bunch of Flask functions/extensions for Admin, Security, blueprint, RESTful structure.

License: MIT License

Python 94.62% HTML 5.38%

flask-template-advanced's Introduction

Flask app template - Advanced

an advanced Flask app template, integrated bunch of Flask functions/extensions for Admin, Security, blueprint, RESTful structure.

fit for both python2 & python3

Thanks to: Miguel Grinberg "Flask Web Development"

snapshot

Features:

  • configurations in /config.py
  • Flask_Script: manage application, deployment, command line
  • Flask_sqlalchemy: powerful ORM
  • Flask_Migrate: manage database, upgrade/downgrade
  • Flask_Security: manage Registration/Login/Session/Token
  • Flask_Admin: admin dashboard for managing database, full CURD function
  • Blueprint for main and api, easy for expansion

Install

# git clone
# create virtual env
python3 -m venv venv
source venv/bin/activate
# install python modules
pip3 install -r requirements.txt

Start up

# setup database
python manage.py deploy
# create roles and Admin user
python manage.py initrole
# start development server
python manage.py runserver

Bingo! Check app in your web browser at: http://localhost:5000, and http://localhost:5000/admin

deploy to Heroku Server

ready for deploy to Heroku, Procfile and runtime.txt are included.

# create app in heroku
# git push to heroku
# configure env. variables
# init database by using manage.py

for details, refer to: https://devcenter.heroku.com/articles/getting-started-with-python

Expansion

For production app, you can easily expand functions as you wish, such as:

  • Flask_Compress
  • Flask_Cache
  • Flask_Redis

For a detailed explanation on how things work, check out the guide (CHN).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.