Open source backend service (REST API) for Badger
Python HTML
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
authentication
cdws_api
comments
common
metrics
pycd
stages
testreport
.coveragerc
.env
.gitignore
.travis.yml
LICENSE
Procfile
Procfile.dev
README.md
README_HEROKU.md
Vagrantfile
config.py
dev-requirements.txt
manage.py
requirements.txt
run_coveralls.py
runtime.txt
test-requirements.txt
tox.ini

README.md

Badger-api Build Status Coverage Status

Badger-api is an open source backend service (REST API) for [Badger] (https://github.com/2gis/badger) (AngularJS web UI).

Installation

Development version | Deploy to Heroku

Install dependencies:

   apt-get install -y python3 python3-dev python3-pip python3-setuptools python-virtualenv python-tox
   apt-get install -y libpq-dev libcurl4-openssl-dev libsasl2-dev

Clone repository:

   git clone https://github.com/2gis/badger-api.git
   cd badger-api

Install [Vagrant] (https://www.vagrantup.com/downloads.html), [Docker] (http://docs.docker.com/linux/started/) and type:

   vagrant up

Vagrant will start two Docker containers with postgresql and rabbitmq.

Install requirements and run tests:

   tox

Activate virtual env:

   source .tox/py34/bin/activate

Install dev requirements and create database model:

   pip install -r dev-requirements.txt
   honcho run ./manage.py syncdb

Run api + celery:

   honcho start -f Procfile.dev

Now your api is available at http://localhost:8000/api/

Usage

To start adding content to api, you need a user. Run following command to create it:

   honcho run ./manage.py createsuperuser

The Django admin site is available at http://localhost:8000/admin/

Secret key

For production usage you need secret key. Don't forget to [generate it] (https://gist.github.com/mattseymour/9205591) and add to .env