Giter Site home page Giter Site logo

matikin9 / adopt-civic-art Goto Github PK

View Code? Open in Web Editor NEW

This project forked from hackforla/adopt-civic-art

0.0 1.0 0.0 267 KB

Adopt-A-CivicArt project collaboration with the County Arts Commission

Python 59.37% HTML 16.75% JavaScript 4.50% CSS 19.38%

adopt-civic-art's Introduction

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.

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.
Only edit SCSS files in /static/scss/ and JavaScript files in /static/js/.

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:

  • SECRET_KEY (random 30-50 character string)
  • GOOGLE_MAPS_API_KEY
  • AWS_ACCESS_KEY_ID
  • AWS_SECRET_ACCESS_KEY
  • S3_BUCKET

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 migrate

To check logs: heroku logs -t

adopt-civic-art's People

Contributors

ashwal avatar iandcarroll avatar matikin9 avatar xtine avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.