HTTPS SSH

Food Inspections

About

Welcome to the Food Inspections project! This is the repository containing our upcoming rewrite. For updates, follow @foodinspections.

Overview

This repository contains the following:

  1. A Django project providing the Food Inspections API
  2. (Coming soon?) A static frontend project

Use

To set up a development environment:

  1. Clone this repository (e.g., git clone https://rossnelson@bitbucket.org/rossnelson/foodinspections.git ~/fi)
  2. Install PostgreSQL 9.3+ and PostGIS 2.1+
  3. Create a database foodinspections, owned by user fi with password 83k4ursbL79a7
  4. Install the necessary libraries (pip install django simplejson django_migration_fixture && pip3 install python-dateutil)
  5. If desired, run data/genfixture/generate.sh to generate the fixture data; fixture available in api2/fixtures/initial_data.json
  6. Run python manage.py migrate to build the table structure and populate it with data

From this point, you have a mostly empty Django project and a database full of data. You can use python manage.py shell to access a Python environment or python manage.py dbshell to access PostgreSQL. These commands need to be executed from /src.

To run the server, use python manage.py runserver 0.0.0.0:8000. This will allow you to access the app from your local machine instead of having to use it from within the VM.

Database Information

  • Database: PostgreSQL 9.3
  • Name: foodinspections
  • User: fi
  • Password: 83k4ursbL79a7