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.
The County's civic artworks are cultural assets valued by the communities represented and serviced by Los Angeles County.
Adopt-A-Civic-Artwork inspires people to be stewards of and connect to civic artworks in their neighborhoods.
This project is a Django application written in Python 3 using a PostgreSQL database.
- Python 3.4.x
- virtualenv (virtual environment)
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.
/civicart/sample_local_settings.py file and rename to
local_settings.py. This configures a SQLite server and a debug environment for local development.
pip install -r requirements.txt
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
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
Install NPM dependencies
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
boto) to host and serve image uploaded files (through admin or user uploaded check-in images).
The dev server is currently hosted as a Heroku app for ease of deployment.
Make sure to set environment variables for:
DJANGO_SECRET_KEY(random 30-50 character string)
Steps for Heroku deployment:
- Commit and push all production ready changes onto local git repo
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