Web app for finding hygiene resources in Portland, OR
- Fork and clone this project.
- Django requires Python to run. Download Python3 at https://www.python.org/downloads/ or with your operating system's package manager.
- You may need to install
pip
(Python package manager) if you don't have it already. Follow pip installation. - Install
virtualenv
withpip
(pip is already installed if you're using the latest version of Python).virtualenv
is a tool to create isolated Python environments.$ [sudo] pip install virtualenv
- Create and activate your virtual environment.
$ virtualenv env --no-site-packages $ source env/bin/activate
- After you’ve created and activated a virtual environment, Navigate to the Django project directory
latrine_django
. Install Django and other dependences:$ [sudo] pip install -r requirements.txt
- Apply migrations:
$ python manage.py makemigrations $ python manage.py migrate
- Apply fixtures to populate the database with sample data:
$ python manage.py loaddata fixturefile.json
- Populate the database with the RefugeRestrooms public data:
$ python manage.py get_restrooms
- To have access to the Django admin site, run:
$ python manage.py createsuperuser
Follow the prompts to set up your login and password.
11. To start the development server, run:
sh $ python manage.py runserver
12. Open http://localhost:8000 in your browser to view the list of available endpoints.
The React app will live in the /frontend
folder and talk to Django over an API.
- You’ll need to have Node.js on your local development machine. The Node.js package comes with
npm
, the package manager for JavaScript. cd
into the/frontend
directory and install the existing setup:$ cd ./frontend $ npm install
- To start the development server, run:
$ npm start
- Open http://localhost:3000 in your browser to view the app.
Cd into /latrine_django
and run:
$ python manage.py test
Check out CONTRIBUTING.md for details.