/garfield

A communications platform for deterring high frequency buyers of underground commercial sex.

Primary LanguagePythonMIT LicenseMIT

Garfield

A communications platform for deterring high frequency buyers of underground commercial sex.

Powered by Django and Twilio.

https://travis-ci.org/RobSpectre/garfield.svg?branch=master

Table of Contents

Installation

Install this Django application by first cloning the repository.

git clone https://github.com/RobSpectre/garfield

Install the Python dependencies.

cd garfield
pip install -r requirements.txt

Create a local configuration file and customize with your settings.

cd garfield/garfield/garfield
cp local.sample local.py

Create database.

cd ..
python manage.py makemigrations
python manage.py migrate

Run the server

python manage.py runserver

Configure a Twilio phone number to point to the /sms endpoint of your host.

https://raw.githubusercontent.com/RobSpectre/garfield/master/garfield/garfield/static/images/twilio_phone_number_screenshot.png

Text "HELP" to the number you configured.

Development

Hacking

Install RabbitMQ, required for the Celery task queue. Instructions for Ubuntu.

$ sudo apt-get update
$ sudo apt-get install rabbitmq-server

To hack on the project, fork the repo and then clone locally.

$ git clone https://github.com/RobSpectre/garfield.git

Move to the project directory.

$ cd garfield

Install the Python dependencies (preferably in a virtualenv).

$ pip install -r requirements.txt

Then customize your local variables to configure your Twilio, email and admin accounts you want to receive tips.

$ cp garfield/garfield/local.sample garfield/garfield/local.py
$ vim garfield/garfield/local.py

Move to the Django project root.

$ cd garfield

Start the Celery task queue.

$ celery -A garfield worker -l info

Start the Django app.

$ python manage.py runserver

Testing

Use Tox for easily running the test suite.

$ tox

Meta