jazzband / django-floppyforms

Full control of form rendering in the templates.
http://django-floppyforms.readthedocs.org/
Other
839 stars 145 forks source link

gis warning when I don't want to use gis #189

Open bnisevic opened 7 years ago

bnisevic commented 7 years ago

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")

YRodriguez commented 7 years ago

+1

michela commented 6 years ago

+1

jojjo64 commented 6 years ago

+1

cjerdonek commented 6 years ago

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')
MHLut commented 4 years ago

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