Metadata-Version: 2.1
Name: terra-common
Version: 0.2.10
Summary: The Terra API
Home-page: https://gitlab.makina-corpus.net/Terralego/Core/terra-back/
Author: Terralego
Author-email: terralego-pypi@makina-corpus.com
License: UNKNOWN
Platform: UNKNOWN
Classifier: Programming Language :: Python
Classifier: Topic :: Software Development
Classifier: License :: OSI Approved :: MIT License
Description-Content-Type: text/markdown
Requires-Dist: psycopg2 (<2.8,>=2.7)
Requires-Dist: Django (<2.1.13,>=2.1)
Requires-Dist: djangorestframework (<3.9,>=3.8)
Requires-Dist: djangorestframework-gis (<0.15,>=0.14)
Requires-Dist: djangorestframework-jwt (<1.12,>=1.11)
Requires-Dist: drf-yasg (<1.10,>=1.9)
Requires-Dist: django-cors-headers (<2.3,>=2.2)
Requires-Dist: simpleeval (<1.0,>=0.9)
Requires-Dist: requests (<2.20,>=2.19)
Requires-Dist: mercantile (<1.1,>=1.0)
Requires-Dist: django-url-filter (<0.4,>=0.3)
Requires-Dist: Fiona (<1.9,>=1.8)
Requires-Dist: python-magic (<0.5,>=0.4)
Requires-Dist: docxtpl (<0.6,>=0.5)
Requires-Dist: Pillow (<6.0.0,>=5.3.0)
Requires-Dist: django-storages (<1.8,>=1.7)
Requires-Dist: django-versatileimagefield (<2.0,>=1.10)
Requires-Dist: boto3 (<=1.10,>=1.9)
Requires-Dist: deepmerge (<=1.0)
Requires-Dist: weasyprint (>=44)
Requires-Dist: jsonschema (<3.1,>=3.0)
Requires-Dist: docutils (<0.15)

This is the Terra API.

## Requirements

On Ubuntu, do not use the system packages, which are too old.
* **docker-ce**: https://docs.docker.com/install/linux/docker-ce/ubuntu/
* **docker-compose**: `sudo pip3 install docker-compose`


## Usage

### First launch
Create a docker.env file:
* `mv docker.env.dist docker.env`
* Edit the settings

### Build Container
`docker-compose build`

### Running the project
`docker-compose up`

`docker-compose down`

`docker-compose up` (postgres image)

### Running tests

`docker-compose exec django bash`

`django@container_id:/code$ source venv/bin/activate`

`(venv) django@353cfc271a48:/code$ tox` (global)

`(venv) django@353cfc271a48:/code$ tox terracommon.terra` (pour terra)

### Applying Django migrations
`docker-compose run --rm django /code/venv/bin/python3.6 ./manage.py migrate`


