Skip to content
This repository has been archived by the owner on Jun 13, 2020. It is now read-only.
/ complaint Public archive

⚠️ THIS REPO IS DEPRECATED ⚠️ Submit a Complaint and Consumer Complaint Database websites

License

Notifications You must be signed in to change notification settings

cfpb/complaint

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

⚠️ THIS REPO IS DEPRECATED (12/3/2018) ⚠️

Please migrate to using cfgov-refresh.

Build Status Coverage Status

complaint

Standalone Django project that runs the Consumer Complaint Database application.

Consumer Complaint Database website screenshot

Dependencies

Setup

  1. Set up virtual environment:
mkvirtualenv ccdb
workon ccdb
  1. Install Django 1.8.14 and Python dependencies:
pip install -r requirements.txt
  1. Run server locally:
python manage.py runserver
  1. To set up the front end, first install Gulp if you don't have it:
npm install --global gulp
  1. Install Autoenv if needed:
$ pip install autoenv
  1. Copy .env_SAMPLE to .env and cd into root directory to execute .env.
cp .env_SAMPLE .env
cd ../complaint
  1. Run the front end build script to compile JavaScript, CSS, and image assets:
sh ./setup.sh
  1. Go to landing pages:

Installing app to your project

The Complaint Database and Complaint apps can be installed into other Django projects by doing the following:

In your Django project url.py, you will need to include the following in your urlpatterns list for each app:

url(r'^complaint/', include('complaint.urls')),
url(r'^complaintdatabase/', include('complaintdatabase.urls')),

In your Django project settings.py, you will need to include the following in your INSTALLED_APPS tuple:

'complaint_common',
'complaint',
'complaintdatabase',

Add this to your requirements.txt file:

-e git+https://github.com/cfpb/complaint.git#egg=complaintdatabase

Then run the requirements.txt file in your terminal your virtual environment:

pip install -r requirements.txt

Testing

For Python/Django tests, in the base directory, run the following:

pip install -r test_requirements.txt
./pytest.sh