commonground-api-common 2.6.1__py3-none-any.whl → 2.6.2__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: commonground-api-common
3
- Version: 2.6.1
3
+ Version: 2.6.2
4
4
  Summary: Commonground API tooling
5
5
  Home-page: https://github.com/maykinmedia/commonground-api-common
6
6
  Author: Maykin Media, VNG-Realisatie
@@ -1,5 +1,5 @@
1
- commonground_api_common-2.6.1.data/scripts/generate_schema,sha256=OpKgzlFc_uzA3TVW_vHSYXAD_feLaCdTEnkWjIcxVzA,280
2
- vng_api_common/__init__.py,sha256=yv0wJuq7dd_PlBhLN8iuPUYVsoACKuk2R3Gg5WU-tHk,22
1
+ commonground_api_common-2.6.2.data/scripts/generate_schema,sha256=OpKgzlFc_uzA3TVW_vHSYXAD_feLaCdTEnkWjIcxVzA,280
2
+ vng_api_common/__init__.py,sha256=53Sii4w6BIWn-1RhaTyqUO46gDe4nDCRQDAcpsWFH24,22
3
3
  vng_api_common/admin.py,sha256=iFtUPGf-ha0I-bXgq8QIFrP23Kzk_H3FlgAjt0U-ip0,259
4
4
  vng_api_common/apps.py,sha256=QQiJXRmjX9Q91oh0P9fvVnHe3NSYd1cEcUUBw0HLBCA,3690
5
5
  vng_api_common/checks.py,sha256=tOyfV7MMLGh4anrd_W30LvJCxiyQ4sFs1mGd9mtrEc0,1175
@@ -14,7 +14,7 @@ vng_api_common/exception_handling.py,sha256=Z8Si1-GPWaTtsgaFI_zLOvlnLVLM8jqfgFIi
14
14
  vng_api_common/exceptions.py,sha256=7Qk5dlETjoQjZeGRKei4PkeLACLoZOMrMiuyi-yn6Kk,615
15
15
  vng_api_common/fields.py,sha256=1911m0CKEU-5-2t_h5P-D2YjC8BGosx8t8FQ-SGfgFw,6335
16
16
  vng_api_common/filters.py,sha256=oPivwrES1BQgSUg1jD9hJab7dyoO3VbZDVbbRRiW2SQ,5618
17
- vng_api_common/filtersets.py,sha256=Ioarp5t_cz6Hf3iIcP2Rc0D7tGYhcMQPVdIJJ2dvtv8,867
17
+ vng_api_common/filtersets.py,sha256=CpmuOg6jGKFDwVeCusax-CBI7tv-EuOSBLwewdkLu1Y,1256
18
18
  vng_api_common/generators.py,sha256=88yQN5-vRFUegfzQcsZtlpbtQyn_zZQwvs20OidPK7M,1239
19
19
  vng_api_common/geo.py,sha256=AZbrw0rwGYOmaSUk8JJSkx-4_tVrfT_cgggh9omRwhU,1862
20
20
  vng_api_common/middleware.py,sha256=2DRw0hPpvUMqwoH1Ze8S7tDB16lmj4Bnd6vN5ijkGM8,875
@@ -183,7 +183,7 @@ vng_api_common/tests/auth.py,sha256=IKDWTEFv4Bign4F70-ibsFcnJqRxEJaXvqaPQJWa1xY,
183
183
  vng_api_common/tests/caching.py,sha256=zfIw5cRRvO9cekHZZKfRqZc8cx5IfJUYNmcH6cuIMg4,624
184
184
  vng_api_common/tests/schema.py,sha256=WDvifDQQiKqIpQijpeQ7rYkFroJmuPuHe7zNhl1Bigk,2293
185
185
  vng_api_common/tests/urls.py,sha256=PFrYzQbBC0TFPMEn3uPhcBG0IQs9JsEPqckicJT1UA4,2159
186
- commonground_api_common-2.6.1.dist-info/METADATA,sha256=TCEnYBoRYR_1qTBTE73HroD-J4mDJEHuZOeROVkAcvo,6965
187
- commonground_api_common-2.6.1.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
188
- commonground_api_common-2.6.1.dist-info/top_level.txt,sha256=vPismc83zPzWXTmlNCCwfDlFV9iygJYxNJW5iDjKTgw,15
189
- commonground_api_common-2.6.1.dist-info/RECORD,,
186
+ commonground_api_common-2.6.2.dist-info/METADATA,sha256=wBqB31TZDGKWyv6an6TP8I6tBFwVUgnQed6gevn6mWg,6965
187
+ commonground_api_common-2.6.2.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
188
+ commonground_api_common-2.6.2.dist-info/top_level.txt,sha256=vPismc83zPzWXTmlNCCwfDlFV9iygJYxNJW5iDjKTgw,15
189
+ commonground_api_common-2.6.2.dist-info/RECORD,,
@@ -1 +1 @@
1
- __version__ = "2.6.1"
1
+ __version__ = "2.6.2"
@@ -25,3 +25,13 @@ class FilterSet(filterset.FilterSet):
25
25
  """
26
26
 
27
27
  FILTER_DEFAULTS = FILTER_FOR_DBFIELD_DEFAULTS
28
+
29
+ @classmethod
30
+ def filter_for_field(cls, field, field_name, lookup_expr=None):
31
+ """
32
+ Add help texts for model field filters
33
+ """
34
+ filter_set = super().filter_for_field(field, field_name, lookup_expr)
35
+ if not filter_set.extra.get("help_text"):
36
+ filter_set.extra["help_text"] = getattr(field, "help_text", None)
37
+ return filter_set