NYCommons.org helps New Yorkers impact decisions about public land and buildings in their neighborhoods. It is a collaboration between Common Cause/NY, the Community Development Project at the Urban Justice Center, and 596 Acres, Inc.
This site uses the Living Lots ® framework by 596 Acres ®.
- Clone this repo locally.
- Create a Python environment where your requirements will be saved with virtualenv and virtualenvwrapper.
- Install the requirements: pip install -r requirements/base.txt and pip install -r requirements/local.txt.
- Set all the required environment variables in your shell. Copy deploy/templates/envvars.sh somewhere and source it when developing the project.
- With the virtualenv activated, try to run the Django project: django-admin runserver_plus. If there are issues with environment variables, the database, or other requirements, they should appear here.
- The database dump you loaded will have no useful superusers. Create one with django-admin createsuperuser.
Tilestache serves the points and polygons that appear on the map.
- Copy the tilestache.cfg template into a new directory in the project root called tilestache. Update the username, database, and password as necessary.
- Create the views needed for TileStache to run (visible_centroids and visible_polygons). You can either run the SQL manually or copy Makefile.example to a file named Makefile, set the DB_NAME and DB_USER, and run make install_tilestache_views.
- When you run tilestache-server.py -c tilestache/tilestache.cfg you should get no errors.
- cd nycommons/static
- npm install
- grunt dev should work without any errors.
Whenever you're developing for the site you'll want the following processes running:
- Django: django-admin runserver_plus.
- TileStache: tilestache-server.py -c tilestache/tilestache.cfg.
- Grunt: cd nycommons/static && grunt dev.
GNU Affero General Public License. See LICENSE.