adopt-civic-art

Adopt A Civic Art

Description & History

This project was inspired by City of Boston’s Adopt-a-Hydrant program (an Esri application with support from Code for America) where members of the community could “adopt” a hydrant and commit to shoveling snow to provide access to the hydrant for the Fire Department after every snowfall. The adopter would then be asked to submit a picture of the newly shoveled access path to the hydrant.

For civic artwork, the adoption model is different. We ABSOLUTELY do not want members of the community to remove graffiti or guano directly. In our model, the member of the community who adopts an available civic artwork is asked to take a series of documentary photos so Los Angeles County Arts Commission staff can visually monitor the works for common public art issues. The primary purpose of the adoption program is civic engagement with artworks that are part of the County civic art collection, and the secondary purpose is monitoring for maintenance and conservation issues.

The basic function of this web application is to provide a platform for community members to submit photos of County-owned civic artworks as a means of visual documentation and trigger maintenance efforts as needed.

Vision Statement

The County’s civic artworks are cultural assets valued by the communities represented and serviced by Los Angeles County.

Mission Statement

Adopt-A-Civic-Artwork inspires people to be stewards of and connect to civic artworks in their neighborhoods.

Technical Overview

This project is a Django application written in Python 3 using a PostgreSQL database.

Installation Instructions

Basic Prerequisites:

There are many different ways to set up a virtual environment, so feel free to use a method that works for you. However please make sure that you are running Python 3.4+ within the activated environment if you have multiple versions of Python on your machine.

Local Settings

Find the /civicart/sample_local_settings.py file and rename to local_settings.py. This configures a SQLite server and a debug environment for local development.

Install dependencies

pip install -r requirements.txt

Run migrations

python manage.py migrate

Create an initial admin account

python manage.py createsuperuser

Run the server locally

python manage.py runserver

Cloud9 Installation Instructions

As of August 2017, Cloud9 comes with both Python 2.7 and Python 3.4 installed in the workspace. To install dependencies, use:

sudo pip3 install -r requirements.txt

Get a Google Maps API Key and add it to /civicart/local_settings.py.

Run migrations with python3:

python3 manage.py migrate

Create an initial admin account:

python3 manage.py createsuperuser

Run the server locally in the Cloud9 workspace:

python3 manage.py runserver $IP:$PORT

Cloud9 will give you a link to where the application is running.

Front End Development

This project uses Webpack 3 to compile JS and SCSS files.
Editable SCSS and JS files are in /static/ and the compiled files are built to /dist/.

Install NPM dependencies

npm install

Build JS/SCSS files

npm run build

Watch JS/SCSS files

npm run watch

Static/Media File Management

When developing locally, all static and media files will be local. However, production will use WhiteNoise for static file serving (like CSS, JS, and app images) and Amazon S3 (with django-storages and boto) to host and serve image uploaded files (through admin or user uploaded check-in images).

Development Server

The dev server is currently hosted as a Heroku app for ease of deployment.

Deployment Instructions

Make sure to set environment variables for:

Steps for Heroku deployment:

  1. heroku login
  2. Commit and push all production ready changes onto local git repo
  3. git push heroku master

To run database migrations on prod:
heroku run python manage.py makemigrations
heroku run python manage.py migrate

To check logs: heroku logs -t