diff options
| author | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2023-09-14 06:04:12 +0200 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2023-09-18 22:12:40 +0200 |
| commit | 7433237664e9a942d6584b4e70fd6a5174cf8f39 (patch) | |
| tree | c49b8f77204f2fa3e23272b19040a71d3a7f2cfc /django/contrib/gis/forms | |
| parent | 04eb1b4567c96ccb167c16a95ca12c336b0c791b (diff) | |
Refs #33924 -- Removed BaseGeometryWidget.map_height/map_width attributes per deprecation timeline.
Diffstat (limited to 'django/contrib/gis/forms')
| -rw-r--r-- | django/contrib/gis/forms/widgets.py | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/django/contrib/gis/forms/widgets.py b/django/contrib/gis/forms/widgets.py index 49ca48794b..55895ae9f3 100644 --- a/django/contrib/gis/forms/widgets.py +++ b/django/contrib/gis/forms/widgets.py @@ -1,5 +1,4 @@ import logging -import warnings from django.conf import settings from django.contrib.gis import gdal @@ -7,7 +6,6 @@ from django.contrib.gis.geometry import json_regex from django.contrib.gis.geos import GEOSException, GEOSGeometry from django.forms.widgets import Widget from django.utils import translation -from django.utils.deprecation import RemovedInDjango51Warning logger = logging.getLogger("django.contrib.gis") @@ -20,8 +18,6 @@ class BaseGeometryWidget(Widget): geom_type = "GEOMETRY" map_srid = 4326 - map_width = 600 # RemovedInDjango51Warning - map_height = 400 # RemovedInDjango51Warning display_raw = False supports_3d = False @@ -29,19 +25,8 @@ class BaseGeometryWidget(Widget): def __init__(self, attrs=None): self.attrs = {} - for key in ("geom_type", "map_srid", "map_width", "map_height", "display_raw"): + for key in ("geom_type", "map_srid", "display_raw"): self.attrs[key] = getattr(self, key) - if ( - (attrs and ("map_width" in attrs or "map_height" in attrs)) - or self.map_width != 600 - or self.map_height != 400 - ): - warnings.warn( - "The map_height and map_width widget attributes are deprecated. Please " - "use CSS to size map widgets.", - category=RemovedInDjango51Warning, - stacklevel=2, - ) if attrs: self.attrs.update(attrs) |
