All Projects → twintechlabs → Flaskdash

twintechlabs / Flaskdash

Licence: other
Flask starter app featuring CoreUI and the FlaskUser module.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Flaskdash

Slapdash
Boilerplate for bootstrapping scalable multi-page Dash applications
Stars: ✭ 225 (+150%)
Mutual labels:  flask, bootstrap
Flasksaas
A great starting point to build your SaaS in Flask & Python, with Stripe subscription billing 🚀
Stars: ✭ 412 (+357.78%)
Mutual labels:  flask, bootstrap
Issue Label Bot
Code For The Issue Label Bot, an App that automatically labels issues using machine learning, available on the GitHub Marketplace. This is also code for the blog article: "How to automate tasks on GitHub with machine learning for fun and profit"
Stars: ✭ 292 (+224.44%)
Mutual labels:  flask, bootstrap
Upload Demo
Uploading a large file by fragmentation, powered by Flask and WebUploader.
Stars: ✭ 144 (+60%)
Mutual labels:  flask, bootstrap
Tableexport
The simple, easy-to-implement library to export HTML tables to xlsx, xls, csv, and txt files.
Stars: ✭ 781 (+767.78%)
Mutual labels:  flask, bootstrap
Flog
A Simple Blog Powered by Flask
Stars: ✭ 150 (+66.67%)
Mutual labels:  flask, bootstrap
Job Web Demo
Python Web 实战项目,Flask + Jinja2 + Bootstrap 开发的招聘网站
Stars: ✭ 87 (-3.33%)
Mutual labels:  flask, bootstrap
Cookiecutter Flask
A flask template with Bootstrap 4, asset bundling+minification with webpack, starter templates, and registration/authentication. For use with cookiecutter.
Stars: ✭ 3,967 (+4307.78%)
Mutual labels:  flask, bootstrap
Gae Init
Google App Engine based on Python, Flask, RESTful, Bootstrap and tons of other cool features
Stars: ✭ 533 (+492.22%)
Mutual labels:  flask, bootstrap
Beibq
基于flask开发类似gitbook的知识管理网站。 http://demo.beibq.cn
Stars: ✭ 480 (+433.33%)
Mutual labels:  flask, bootstrap
Tedivms Flask
Flask starter app with celery, bootstrap, and docker environment
Stars: ✭ 142 (+57.78%)
Mutual labels:  flask, bootstrap
Databook
A facebook for data
Stars: ✭ 26 (-71.11%)
Mutual labels:  flask, bootstrap
Weeklyreport
基于Flask的开源周报系统,快速docker部署
Stars: ✭ 102 (+13.33%)
Mutual labels:  flask, bootstrap
Ssis Dashboard
HTML5 SQL Server Integration Services Dashboard
Stars: ✭ 206 (+128.89%)
Mutual labels:  flask, bootstrap
Booklibrary
📚Simple Book library application written on flask with SQLite database.
Stars: ✭ 98 (+8.89%)
Mutual labels:  flask, bootstrap
Bootstrap Flask
Bootstrap 4 helper for Flask/Jinja2.
Stars: ✭ 441 (+390%)
Mutual labels:  flask, bootstrap
Fuse
A simple file sharing web service in Vue.js and Flask
Stars: ✭ 7 (-92.22%)
Mutual labels:  flask, bootstrap
Swarmops
Manage swarm clusters to provide a more concise and compact intermediate layer web application with swarm ui.
Stars: ✭ 63 (-30%)
Mutual labels:  flask, bootstrap
Bootplus
基于SpringBoot + Shiro + MyBatisPlus的权限管理框架
Stars: ✭ 88 (-2.22%)
Mutual labels:  bootstrap
Phint
Interactively scaffolds and init new (or fixup old) PHP project/library with sane defaults using templates in no time
Stars: ✭ 89 (-1.11%)
Mutual labels:  bootstrap

FlaskDash starter app v1.4

Screenshot

This code base serves as starting point for writing your next Flask application.

It's based on the awesome work of the Ling Thio and includes the open source CoreUI admin BootStrap theme and a number of enhancements to the base Flask Starter app including adding basic user management and a separate view file for API code.

Code characteristics

  • Tested on Python 2.6, 2.7, 3.3, 3.4, 3.5, 3.6, and 3.7
  • Well organized directories with lots of comments
    • app
      • commands
      • controllers
      • models
      • static
      • templates
    • tests
  • Includes test framework (py.test and tox)
  • Includes database migration framework (alembic)
  • Sends error emails to admins for unhandled exceptions

Setting up a development environment

We assume that you have git and virtualenv and virtualenvwrapper installed.

# Clone the code repository into ~/dev/my_app
mkdir -p ~/dev
cd ~/dev
git clone https://github.com/twintechlabs/flaskdash.git my_app

# Create the 'my_app' virtual environment
mkvirtualenv -p PATH/TO/PYTHON my_app

# Install required Python packages
cd ~/dev/my_app
workon my_app
pip install -r requirements.txt

Configuring SMTP

Edit the local_settings.py file.

Specifically set all the MAIL_... settings to match your SMTP settings

Note that Google's SMTP server requires the configuration of "less secure apps". See https://support.google.com/accounts/answer/6010255?hl=en

Note that Yahoo's SMTP server requires the configuration of "Allow apps that use less secure sign in". See https://help.yahoo.com/kb/SLN27791.html

Initializing the Database

# Create DB tables and populate the roles and users tables
python manage.py init_db

# Or if you have Fabric installed:
fab init_db

Running the app (development)

# Start the Flask development web server
python manage.py runserver

# Or if you have Fabric installed:
fab runserver

Point your web browser to http://localhost:5000/

You can make use of the following users:

Running the app (production)

To run the application in production mode, gunicorn3 is used (and included in requirements.txt.

# Run the application in production mode
./runserver.sh

Running the automated tests

# Start the Flask development web server
py.test tests/

# Or if you have Fabric installed:
fab test

Using Server-side Sessions

Don't use server side session data! You should do everything you can to keep each request/response stateless. It'll be easier to maintain your code and easier to debug when something goes wrong.

However, if you really need sessions, FlaskDash has Flask-Session built in (https://pythonhosted.org/Flask-Session/). It is configured to use to the SQLAlchmey interface by default and the init_db command will set up a sessions table in your database. You can change your configuration to use redis or MongoDB, as well.

Sessions are available in misc_views.py and can be added to any additional controllers you create.

This is how you might use it:

# Session example
session['key'] = 'value'
val = session.get('key', 'not set')
print(val)
value    
val = session.get('key2', 'not set')
print(val)
not set

Trouble shooting

If you make changes in the Models and run into DB schema issues, delete the sqlite DB file app.sqlite.

Acknowledgements

With thanks to the following Flask extensions:

Flask-User-starter-app was used as a starting point for this code repository.

Authors

  • Matt Hogan - matt AT twintechlabs DOT io
  • Ling Thio -- ling.thio AT gmail DOT com
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].