GithubHelp home page GithubHelp logo

anthrax3 / flask-user-starter-app Goto Github PK

View Code? Open in Web Editor NEW

This project forked from lingthio/flask-user-starter-app

0.0 1.0 0.0 294 KB

License: BSD 2-Clause "Simplified" License

Python 69.68% CSS 0.98% HTML 27.98% Mako 1.35%

flask-user-starter-app's Introduction

Flask-User starter app v1.0

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

This branch is for Flask-User v1.0.

For Flask-User v0.6, see the Flask-User-Starter-App v0.6 branch.

Code characteristics

  • Tested on Python 2.6, 2.7, 3.3, 3.4, 3.5 and 3.6
  • Well organized directories with lots of comments
    • app
      • commands
      • models
      • static
      • templates
      • views
    • 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/lingthio/Flask-User-starter-app.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

Copy the local_settings_example.py file to local_settings.py.

cp app/local_settings_example.py app/local_settings.py

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

# 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 automated tests

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

# Or if you have Fabric installed:
fab test

Trouble shooting

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

See also

Acknowledgements

With thanks to the following Flask extensions:

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

Authors

  • Ling Thio -- ling.thio AT gmail DOT com

flask-user-starter-app's People

Contributors

lingthio avatar

Watchers

 avatar

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.