Skip to content

jeancochrane/just-spaces

 
 

Repository files navigation

Just Spaces

🏕 A tool from DataMade and University City District to promote better and more just public spaces

Requirements

  • Python 3.x
  • Docker

Running the app locally

  1. Clone this repository and cd into your local copy.

    git clone git@github.com:datamade/just-spaces.git
    cd just-spaces
  2. Create a virtual environment. (We recommend using virtualenvwrapper for working in a virtualized development environment.)

    mkvirtualenv -p python3 just-spaces
  3. Install the Django requirements.

    pip install -r requirements.txt -r dev-requirements.txt
  4. Copy the example local settings file to the correct location:

    cp just-spaces/local_settings.example.py just-spaces/local_settings.py
  5. We use the Parcel bundler via Node.js to compile frontend JavaScript to syntax that is cross-browser compatible. In order to avoid requiring a local Node.js installation, the JavaScript dev environment is containerized with Docker and Docker Compose. Use the build command to build the frontend dev environment container, a build process that will install NPM dependencies for the frontend:

    docker-compose build
  6. Create the database:

    createdb just-spaces
  7. Run migrations:

    python manage.py migrate
  8. Make a superuser for so that you can access the admin interface:

     python manage.py createsuperuser

    Django should prompt you to provide a username, email, and password.

  9. Initialize PLDP data:

    python manage.py initialize_pldp
  10. Run the app locally!

    # In one shell, bundle and watch JavaScript assets
    docker-compose up
    
    # In another shell, run the dev server
    python manage.py runserver

    Navigate to http://localhost:8000/.

On form building

This app uses a custom fork of django-fobi for the Create Survey, Edit Survey, and Run Survey views. django-fobi's documentation is an immensely helpful resource. Add-ons to the base are in this repo's fobi-custom folder, including custom plugins that draw from django-pldp, our implementation of the Public Life Data Protocol.

About

repository for the Just Spaces project

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 74.4%
  • HTML 12.2%
  • Shell 7.0%
  • CSS 3.2%
  • Makefile 2.2%
  • Dockerfile 0.7%
  • JavaScript 0.3%