#Beckton - build groups of paying members
Note: still in development - it is a good idea to get in touch before using for real.
Beckton is a tool for creating a new group of paying members, using the Conditional Commitment design pattern - payments are only taken if a target it met.
##Deploy to Heroku
Before you start, you will need to:
- setup an account on GoCardless and get an Access Token
- setup and account on Twillio and get an SID, Auth Token and choose a phone number
- have an account on Heroku (with a payment method setup)
Then, just click this button:
This section describes how to get a development copy of Beckton working.
You must have the following things installed before you start
Clone this repository and install the requirements:
git clone git+https://github.com/memespring/beckton.git cd beckton virtualenv . source bin/activate pip install -r requirements.txt npm install
To run beckton, you need to run several different things:
To run the web app:
source bin/activate export SETTINGS='config.DevelopmentConfig' export GOCARDLESS_ACCESS_TOKEN='ENTER YOUR GO CARDLESS ACCESS TOKEN' python server.py
Run the scheduler (in a separate terminal):
source bin/activate export SETTINGS='config.DevelopmentConfig' celery -A beckton.celery beat
Run the message que (in a separate terminal):
source bin/activate export SETTINGS='config.DevelopmentConfig' export GOCARDLESS_ACCESS_TOKEN='ENTER YOUR GO CARDLESS ACCESS TOKEN' export TWILLIO_SID='ENTER YOUR TWILLIO SID' export TWILLIO_AUTH_TOKEN='ENTER YOUR TWILLIO AUTH TOKEN' export TWILLIO_PHONE_NUMBER='ENTER YOUR TWILIO PHONE NUMBER' celery -A beckton.celery worker
Run the assets compiler (in a separate terminal):
BECKTON_TARGETThe number of people who need to sign up before payments are taken
BECKTON_STATEMENTThe statement that people are agreeing to e.g. I will join a tea club if 10 other people do too
BECKTON_TERMSAn additional thing that people confirm e.g. I am a resident of Barking and Dagenham"
BECKTON_EXPLANATIONSome words explaining the context of this campaign. this is displaid on the 1st page. Markdown is OK.
BECKTON_RATES_LABELThe label for the radio buttons for choosing which rate to pay e.g. what hours do you work?
BECKTON_RATES_CSVWhat rate options and prices to display e.g. "4,Part-time (£4 a month)|8,Full-time (£8 a month)"
BECKTON_POSTCODE_AREAS_CSVLimit signups to specific UK postcodes e.g. "SW9,EC1,BR4" Set to False to allow any postcode
BECKTON_SUCCESSThe message to display on the 1st page when the target has been met e.g. "The target has been met - someone will be in touch"
BECKTON_DIRECT_DEBIT_CURRENCYThe currency for direct debits (defaults to "GBP")
BECKTON_DIRECT_DEBIT_NAMEWhat the subscription should be called in GoCardless
Note: test coverage is currently much lower than it should be.
To run the tests:
source bin/activate export SETTINGS='config.TestingConfig' python tests.py
##Resetting the database
python manage.py reset