1
0
mirror of https://github.com/django/django.git synced 2025-10-24 22:26:08 +00:00

Fixed #33924 -- Deprecated BaseGeometryWidget.map_height/map_width attributes.

This commit is contained in:
Claude Paroz
2022-08-12 12:18:51 +02:00
committed by Mariusz Felisiak
parent 8c3046daad
commit 4fcba800b8
8 changed files with 53 additions and 3 deletions

View File

@@ -32,6 +32,9 @@ details on these changes.
* The ``django.contrib.postgres.fields.CIText`` mixin will be removed.
* The ``map_width`` and ``map_height`` attributes of ``BaseGeometryWidget``
will be removed.
.. _deprecation-removed-in-5.0:
5.0

View File

@@ -106,6 +106,11 @@ from other Django widget attributes.
Height and width of the widget map (default is 400x600).
.. deprecated:: 4.2
``map_height`` and ``map_width`` attributes are deprecated, use CSS to
size map widgets instead.
.. attribute:: BaseGeometryWidget.map_srid
SRID code used by the map (default is 4326).
@@ -131,7 +136,7 @@ widget. For example::
class MyGeoForm(forms.Form):
point = forms.PointField(widget=
forms.OSMWidget(attrs={'map_width': 800, 'map_height': 500}))
forms.OSMWidget(attrs={'display_raw': True}))
Widget classes
--------------

View File

@@ -369,3 +369,6 @@ Miscellaneous
collation.
* ``django.contrib.postgres.fields.CIText`` mixin is deprecated.
* The ``map_height`` and ``map_width`` attributes of ``BaseGeometryWidget`` are
deprecated, use CSS to size map widgets instead.