GithubHelp home page GithubHelp logo

hhy5277 / flask-base Goto Github PK

View Code? Open in Web Editor NEW

This project forked from hack4impact/flask-base

0.0 2.0 0.0 12.92 MB

A dead simple Flask boilerplate app with SQLAlchemy, Redis, User Authentication, and more.

Home Page: http://hack4impact.github.io/flask-base

License: MIT License

Python 45.30% JavaScript 9.35% CSS 5.66% HTML 39.70%

flask-base's Introduction

flask-base Circle CI Stories in Ready [Code Climate] (https://codeclimate.com/github/hack4impact/flask-base/coverage) Issue Count

A Flask application template with the boilerplate code already done for you.

Documentation available at http://hack4impact.github.io/flask-base.

What's included?

  • Blueprints
  • User and permissions management
  • Flask-SQLAlchemy for databases
  • Flask-WTF for forms
  • Flask-Assets for asset management and SCSS compilation
  • Flask-Mail for sending emails
  • gzip compression
  • Redis Queue for handling asynchronous tasks
  • ZXCVBN password strength checker
  • CKEditor for editing pages

Demos

Home Page:

home

Registering User:

registering

Admin Homepage:

admin

Admin Editing Page:

edit page

Admin Editing Users:

edit user

Admin Adding a User:

add user

Setting up

Clone the repo
$ git clone https://github.com/hack4impact/flask-base.git
$ cd flask-base
Initialize a virtualenv
$ pip install virtualenv
$ virtualenv env
$ source env/bin/activate
(If you're on a mac) Make sure xcode tools are installed
$ xcode-select --install
Add Environment Variables

Create a file called .env that contains environment variables in the following syntax: ENVIRONMENT_VARIABLE=value. For example, the mailing environment variables can be set as the following. We recommend using Sendgrid for a mailing SMTP server. But anything else will work as well.

MAIL_USERNAME=SendgridUsername
MAIL_PASSWORD=SendgridPassword
SECRET_KEY=SuperRandomStringToBeUsedForEncryption

Note: do not include the .env file in any commits. This should remain private.

Install the dependencies
$ pip install -r requirements.txt
Other dependencies for running locally

You need to install Foreman and Redis. Chances are, these commands will work:

$ gem install foreman

Mac (using homebrew):

$ brew install redis

Linux:

$ sudo apt-get install redis-server
Create the database
$ python manage.py recreate_db
Other setup (e.g. creating roles in database)
$ python manage.py setup_dev

Note that this will create an admin user with email and password specified by the ADMIN_EMAIL and ADMIN_PASSWORD config variables. If not specified, they are both [email protected] and password respectively.

[Optional] Add fake data to the database
$ python manage.py add_fake_data

Running the app

$ source env/bin/activate
$ foreman start -f Local

Formatting code

Before you submit changes to flask-base, you may want to auto format your code with python manage.py format.

Contributing

Contributions are welcome! Check out our Waffle board which automatically syncs with this project's GitHub issues. Please refer to our Code of Conduct for more information.

Documentation Changes

To make changes to the documentation refer to the Mkdocs documentation for setup.

To create a new documentation page, add a file to the docs/ directory and edit mkdocs.yml to reference the file.

When the new files are merged into master and pushed to github. Run mkdocs gh-deploy to update the online documentation.

License

MIT License

flask-base's People

Contributors

abhisuri97 avatar aharelick avatar anniemeng avatar sandlerben avatar waffle-iron avatar weronica avatar yoninachmany avatar

Watchers

 avatar  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.