From bd52da072019a5d524407f38d693c8db2a695471 Mon Sep 17 00:00:00 2001 From: Wouter Claeys Date: Thu, 25 Apr 2024 09:40:53 +0200 Subject: [PATCH] Fixes #216 --- CHANGES.rst | 5 +++++ crabpy_pyramid/renderers/adressenregister.py | 3 ++- requirements.txt | 3 +-- setup.py | 4 ++-- 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index 8a4db28..05e824c 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,8 @@ +2.1.1 (25-04-2024) +------------------ + +- Land rendering fix voor laatste versie van pycountry (#216) + 2.1.0 (24-04-2024) ------------------ diff --git a/crabpy_pyramid/renderers/adressenregister.py b/crabpy_pyramid/renderers/adressenregister.py index 7103004..0a7fe71 100644 --- a/crabpy_pyramid/renderers/adressenregister.py +++ b/crabpy_pyramid/renderers/adressenregister.py @@ -106,7 +106,7 @@ def list_landen_adapter(obj, request): """ Adapter for rendering a list of landen to json. """ - return {"code": obj.alpha_2, "naam": _(obj.name)} + return {"code": obj.alpha_2, "naam": obj.name, "vlag": obj.flag} json_list_renderer.add_adapter(adressenregister.Gewest, list_gewesten_adapter) @@ -226,6 +226,7 @@ def item_land_adapter(obj, request): "alpha2": obj.alpha_2, "alpha3": obj.alpha_3, "naam": obj.name, + "vlag": obj.flag, } diff --git a/requirements.txt b/requirements.txt index 419bd98..4047196 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,4 @@ # Tested and approved with these versions pyramid==2.0.0 -crabpy==1.3.1 -pycountry==18.12.8 ; python_version < '3.0' +crabpy==1.3.2 pycountry==23.12.11 ; python_version >= '3.4' diff --git a/setup.py b/setup.py index dcfff36..fbfc808 100644 --- a/setup.py +++ b/setup.py @@ -8,7 +8,7 @@ requires = [ 'pyramid', - 'crabpy>=0.15.0', + 'crabpy>=1.3.2', 'pycountry>=23.12.11' ] @@ -21,7 +21,7 @@ testing_extras = tests_requires + [] setup(name='crabpy_pyramid', - version='2.1.0', + version='2.1.1', description='Bindings for the CRABpy webservices and the Pyramid framework.', long_description=README + '\n\n' + CHANGES, classifiers=[