AWegnerGitHub / openshift_se_plagiarism

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Using Flask-Migration

Initial Migration

python migrations_manager.py db init
python migrations_manager.py db migrate

Creating a new migration

python migrations_manager.py db migrate

Upgrading

python migrations_manager.py db upgrade

If the Action Hooks aren't executable, run this and then commit the changes:

git update-index --chmod=+x <file>

The following needs to be added to the Gear's environment variables to allow integration with the Stack Exchange APIs

CLIENT_SECRET="YOURSECRET"

YOURSECRET is the value provided when you registered an app. This is accomplished by executing the following command, while logged in via SSH to your gear

echo "YOURSECRET" > ~/.env/user_vars/CLIENT_SECRET

To use this value in a local test environment, create user_settings.py and add CLIENT_SECRET=YOURSECRET to the file

A basic Flask quickstart

With support for serving easy APIs and static content

Build Status

To deploy a clone of this application using the rhc command line tool:

rhc app create flask python-2.7 --from-code=https://github.com/ryanj/flask-base.git

Or link to a web-based clone+deploy on OpenShift Online or on your own OpenShift cloud:

https://openshift.redhat.com/app/console/application_type/custom?cartridges%5B%5D=python-2.7&initial_git_url=https%3A%2F%2Fgithub.com%2Fryanj%2Fflask-base.git

Local server

Start a local webserver by running:

python app.py

License

This code is dedicated to the public domain to the maximum extent permitted by applicable law, pursuant to CC0 (http://creativecommons.org/publicdomain/zero/1.0/)

About


Languages

Language:Python 78.6%Language:HTML 16.1%Language:Mako 3.2%Language:Shell 2.1%