parameters: (self, db_field, request=None, **kwargs)
docstring: Overloaded from ModelAdmin to set Leaflet widget
          in form field init params.
docstring_summary: Overloaded from ModelAdmin to set Leaflet widget
          in form field init params.
docstring_tokens: Overloaded from ModelAdmin to set Leaflet widget in form field init params .
function: def formfield_for_dbfield(self, db_field, request=None, **kwargs):
          """
          Overloaded from ModelAdmin to set Leaflet widget
          in form field init params.
          """
          is_geometry = isinstance(db_field, (GeometryField, GeoJSONField))
          is_editable = is_geometry and (db_field.dim < 3 or
                                         self.widget.supports_3d)
  
          if is_editable:
              # Setting the widget with the newly defined widget.
              widget = self.widget
              if 'widget' in kwargs and issubclass(kwargs['widget'], LeafletWidget):
                  # If the widget is already a LeafletWidget of some kind
                  # Then use it rather than a blank one.
                  widget = kwargs['widget']
  
              kwargs['widget'] = self._get_map_widget(db_field, widget)
              return db_field.formfield(**kwargs)
          else:
              return super().formfield_for_dbfield(db_field, request, **kwargs)
function_tokens: def formfield_for_dbfield ( self , db_field , request = None , * * kwargs ) : is_geometry = isinstance ( db_field , ( GeometryField , GeoJSONField ) ) is_editable = is_geometry and ( db_field . dim < 3 or self . widget . supports_3d ) if is_editable : # Setting the widget with the newly defined widget. widget = self . widget if 'widget' in kwargs and issubclass ( kwargs [ 'widget' ] , LeafletWidget ) : # If the widget is already a LeafletWidget of some kind # Then use it rather than a blank one. widget = kwargs [ 'widget' ] kwargs [ 'widget' ] = self . _get_map_widget ( db_field , widget ) return db_field . formfield ( * * kwargs ) else : return super ( ) . formfield_for_dbfield ( db_field , request , * * kwargs )