GithubHelp home page GithubHelp logo

cellerich / avwx-account Goto Github PK

View Code? Open in Web Editor NEW

This project forked from avwx-rest/avwx-account

0.0 1.0 0.0 69 KB

Account management app for AVWX-API

License: MIT License

Python 62.42% HTML 31.76% Mako 1.09% CSS 4.73%

avwx-account's Introduction

AVWX-Account

Requirements Status License: MIT

Account management app for AVWX-API

Setup

First we should install the app requirements and copy the env file. I recommend always installing into a virtual environment.

pip install -r requirements.txt
cp .env.sample .env

The app uses a Postgres backend. To run locally, you'll need to create a rocky database and owner.

CREATE USER avwx;
CREATE DATABASE avwx_account OWNER avwx;

Before we can run the migrations, we need to tell Flask where the app is.

export FLASK_APP=avwx_account:app
export FLASK_ENV=development

Now we can populate the database.

flask db upgrade

Now you should be able to start the app. However, you'll need to change a value in avwx_account/config.py to disable email authentication when creating new users.

USER_ENABLE_EMAIL = False

Runnng

If FLASK_APP is pointed to avwx_account/__init__.py, you can run the app using the Flask CLI.

flask run

Deploy

The app is currently deployed on Heroku, so we need to have the Procfile for release and run. There's a quirk with Heroku's build pack that doesn't allow for gunicorn to point to an app within a package; the entire app 404s when called. Therefore, the production gunicorn pulls the app from manage.py which is currently the file's only use. This might change in the future, but for now it works.

Develop

Code checked into this repository is expected to be run through the black code formatter first.

# Install black
pip install black

# Format py package files
find avwx_account -iname "*.py" | xargs black

avwx-account's People

Contributors

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