django-floppyforms icon indicating copy to clipboard operation
django-floppyforms copied to clipboard

gis warning when I don't want to use gis

Open bnisevic opened this issue 7 years ago • 5 comments

In the v1.7.0 floppyforms are requiring GDAL even if I don't want to use GeoDjango widgets. https://github.com/gregmuellegger/django-floppyforms/blob/master/floppyforms/init.py#L21

This should be optional. I shouldn't see warning that floppyforms.gis can not be imported when GDAL is missing if I don't want to use GeoDjango widgets.

UserWarning: Unable to import floppyforms.gis, geometry widgets not available "Unable to import floppyforms.gis, geometry widgets not available")

bnisevic avatar May 23 '17 08:05 bnisevic

+1

YRodriguez avatar May 30 '17 16:05 YRodriguez

+1

michela avatar Feb 21 '18 03:02 michela

+1

jojjo64 avatar Mar 19 '18 19:03 jojjo64

You can include the following early on in the execution of your code to suppress the warning yourself:

import warnings

warnings.filterwarnings('ignore', module='floppyforms',
    message='Unable to import floppyforms.gis')

cjerdonek avatar Apr 08 '18 12:04 cjerdonek

Bumping this; it would be nice to use a settings flag instead of suppressing the warning.

MHLut avatar Jul 17 '20 12:07 MHLut