Skip to content
premium bike rentals - sample marketplace application
Python JavaScript CSS
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
alembic
rentmybike
static
templates
tests
.gitignore
.travis.yml
LICENSE
Procfile
README.mkd
alembic.ini
requirements.txt
run.py
setup.cfg
setup.py
test-requirements.txt

README.mkd

rentmybike

Build Status

Reference implementation of Balanced for collecting and charging credit cards, and collecting and crediting bank accounts.

Uses jQuery, Less, Python (>= 2.7), SQLite, WTForms, and Bootstrap.

If you'd like to deploy signup for a Heroku account if you dont already have one and install Toolbelt.

Install

$ git clone https://github.com/balanced/rentmybikes.git
$ cd rentmybikes
$ mkvirtualenv rentmybike
$ pip install -r requirements.txt

Configure

Edit the following in rentmybike/settings/default.py:

  • Set BALANCED_SECRET to your secret key. Get one from Balanced if you dont have one.
  • Set username, password and host of DB_URI for your database.
  • Set MAIL_SERVER, MAIL_USERNAME, MAIL_PASSWORD, MAIL_PORT for your mail server.

Optionally:

  • Set DOMAIN_URI to the domain where rentmybike will be deployed.

Here is an example:

DB_URI = 'postgresql://username:password@server/database'

BALANCED_SECRET = 'supersecret'

MAIL_DEBUG = True
MAIL_SERVER = 'smtp.mailgun.org'
MAIL_USERNAME = 'postmaster@mailgun.org'
MAIL_PASSWORD = 'supersecret'
MAIL_PORT = 587

DOMAIN_URI = 'http://myapp.herokuapp.com'

Run

$ foreman start

or if you dont have Toolbelt

$ ./run.py

Deploy

$ cd rentmybikes
$ heroku create
$ git push origin heroku
$ heroku ps:scale web=1
$ heroku open
Something went wrong with that request. Please try again.