Standalone Django project that runs the Consumer Complaint Database application.
- Unix-based OS (including Macs). Windows is not supported at this time.
- Virtualenv and Virtualenvwrapper, Python modules that keep dependencies project specific and in their own virtual environments.
- Autoenv
- Node
- Gulp
- Capital Framework
- LESS
- Set up virtual environment:
mkvirtualenv ccdb
workon ccdb
- Install Django 1.8.14 and Python dependencies:
pip install -r requirements.txt
- Run server locally:
python manage.py runserver
- To set up the front end, first install Gulp if you don't have it:
npm install --global gulp
- Install Autoenv if needed:
$ pip install autoenv
- Copy
.env_SAMPLE
to.env
and cd into root directory to execute.env
.
cp .env_SAMPLE .env
cd ../complaint
- Run the front end build script to compile JavaScript, CSS, and image assets:
sh ./setup.sh
- Go to landing pages:
- http://127.0.0.1:8000/complaintdatabase/
- http://127.0.0.1:8000/complaint/data-use/
- http://127.0.0.1:8000/complaint/process/
- http://127.0.0.1:8000/complaint/
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
For Python/Django tests, in the base directory, run the following:
pip install -r test_requirements.txt
./pytest.sh