This package is the django implementation from the themes of the infrastructure for spatial information in Europe (INSPIRE)
The full documentation is at https://django-inspire-eu.readthedocs.io.
-
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
-
-
Add it to your INSTALLED_APPS:
INSTALLED_APPS = ( ... "inspire_eu.apps.InspireEuConfig", ... )
-
Customize settings:
- INSPIRE_EU_THEMES
- INSPIRE_EU_DEFAULT_SRID
- INSPIRE_EU_BASE_MODEL
- MIGRATION_MODULES: Very important if you want avoid problems with migrations files
-
Make and execute migrations:
python manage.py makemigrations python manage.py migrate
-
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
-
Add Django Inspire EU's URL patterns:
from inspire_eu import urls as inspire_eu_urls urlpatterns = [ ... url(r"^", include(inspire_eu_urls)), ... ]
Follow steps at django-example directory
Does the code actually work?
source <YOURVIRTUALENV>/bin/activate
(myenv) $ pip install tox
(myenv) $ tox
pip install -r requirements_dev.txt
invoke -l
Tools used in rendering this package:
- Made optional
python-slugify
andfeedparser
- Fixed documentation's build
- Upgrade of
django-example
- Fixed old
OSMGeoAdmin
for Django 4.0 and newer
- Checked
ugettext
andgettext
for compatibility with Django 4.0 and upper - python-slugify optional, using django slugify as fallback
- Set django.db.models.BigAutoField
- Fixed related_name and related_query_name at AbstractOfficialArea model
- Updated python-slugify according its documentation
- Added BaseInspireEUModel at CadastralZoning and CadastralParcel
- Typo fixed AbstractCadastralParcel.national_cadastal_reference to AbstractCadastralParcel.national_cadastral_reference
- First release on PyPI.
- First release on GitHub.