🏕 A tool from DataMade and University City District to promote better and more just public spaces
- Python 3.x
- Docker
-
Clone this repository and
cd
into your local copy.git clone git@github.com:datamade/just-spaces.git cd just-spaces
-
Create a virtual environment. (We recommend using
virtualenvwrapper
for working in a virtualized development environment.)mkvirtualenv -p python3 just-spaces
-
Install the Django requirements.
pip install -r requirements.txt -r dev-requirements.txt
-
Copy the example local settings file to the correct location:
cp just-spaces/local_settings.example.py just-spaces/local_settings.py
-
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
-
Create the database:
createdb just-spaces
-
Run migrations:
python manage.py migrate
-
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.
-
Initialize PLDP data:
python manage.py initialize_pldp
-
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/.
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.