A clean start with a foodsharing API project in python/django
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
deploy
foodsharing_api
tests
.gitignore
.travis.yml
LICENSE
README.md
conftest.py Enable SonarQube and clean up user app Mar 7, 2018
deploy.sh
deploy_rsa.enc Add auto deployment to beta.light.foodsharing.de Aug 24, 2017
manage.py
mysql.cnf
pylintrc
pytest.ini
requirements.in
requirements.txt
requirements_dev.in
requirements_dev.txt

README.md

foodsharing-django-api

A clean start with a foodsharing API project in python/django.

Installing

You need python and preferrably a virtualenv.

Most developers use bleeding edge python while we currently use python 3.4 in production.

For the MySQL library, the following packages under debian are needed:

apt-get install python3-dev libmysqlclient-dev

Create a virtualenv, install pip-tools and the dependencies:

cd foodsharing-django-api
virtualenv --no-site-packages -p /usr/bin/python3 env
. ./env/bin/activate
pip install pip-tools
pip-sync

Database

This backend is supposed to work together with the existing [foodsharing.de] database. Currently, it is not configured to create the necessary database by itself.

The foodsharing.de PHP application is quite easy to setup using docker-compose, but unfortunately not yet available open source.

Please request access at [https://gitlab.com/foodsharing-dev] and follow the instructions for setup.

local_settings.py.example contains the database configuration necessary to talk to the database inside the docker container.

It is important for us to enable a good developer experience although at this stage it is still complicated to completely decouple the projects. It is still likely that this will be happening in the next months, further help on this is highly appreciated

Redis

You'll need a redis running locally too.