Home

Awesome

This is the backend for SaveOurFaves.org.

It's a fairly straightforward Django app with Postgres/PostGIS backing it for the 'nearby' queries. You'll also need the React frontend. It also uses nginx as the load balancer and file server for the static files/React app.

To get this up and running:

At this point you should have a running Django instance on localhost:8000. You should then create at least one Area object (for example, in the Bay Area, that represents SF vs East Bay vs South Bay), a few Neighborhood objects inside each Area, and then add some Places to each Neighborhood. Once you’ve done all of that, you can run:

# log into the Docker container running Django
docker exec -it <name of Django container> /bin/bash
cd /usr/local/site
python scripts/dump_neighborhoods.py Neighborhoods.js
python scripts/dump_places.py Places.js

At that point, you can copy the Neighborhoods.js and Places.js files into the saveourfaves-frontend repository; use them to overwrite the ones in src/CityData/. You’ll also want to update src/CityData/Areas.js with information about your areas.