Skip to content

Latest commit

 

History

History
136 lines (87 loc) · 3.86 KB

README.rst

File metadata and controls

136 lines (87 loc) · 3.86 KB

Django Inspire EU

Django 2.0, 2.1, 2.2, 3.0, 3.1, 3.2, 4.0, 4.1, 4.2, 5.0, 5.1, 5.2 Documentation Status See Build Status on Travis CI Code style: black

This package is the django implementation from the themes of the infrastructure for spatial information in Europe (INSPIRE)

Documentation

The full documentation is at https://django-inspire-eu.readthedocs.io.

Quickstart

  1. Install Django Inspire EU:

    • Stable version, preferably within a virtual environment:

      $ mkvirtualenv django-inspire-eu $ pip install django-inspire-eu

    • Development version:

      $ pip install -e git+https://github.com/xusy2k/django-inspire-eu.git@master#egg=django-inspire_eu
  2. Add it to your INSTALLED_APPS:

    INSTALLED_APPS = (
        ...
        "inspire_eu.apps.InspireEuConfig",
        ...
    )
  3. Customize :doc:`settings <settings>`

  4. Make and execute migrations:

    python manage.py makemigrations
    python manage.py migrate
  5. Populate base models:

    This django command fetch values from https://inspire.ec.europa.eu. In particular: Status: (valid, invalid, retired), Theme, Application Schema, Code List and For each Code List key, fetch all its Code List Values

    python manage.py load_initial_inspire [-l <language>]  # Default: en
  6. Add Django Inspire EU's URL patterns:

    from inspire_eu import urls as inspire_eu_urls
    
    urlpatterns = [
        ...
        url(r"^", include(inspire_eu_urls)),
        ...
    ]

Working example

Follow steps at django-example directory

Running Tests

Does the code actually work?

source <YOURVIRTUALENV>/bin/activate
(myenv) $ pip install tox
(myenv) $ tox

Development commands

pip install -r requirements_dev.txt
invoke -l

Credits

Tools used in rendering this package: