We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi!
Thanks for this package! When used with https://github.com/makinacorpus/django-leaflet and no initial value, GeoJSONFormField raises the follow error:
GeoJSONFormField
Error creating geometry from value 'null' (String input unrecognized as WKT EWKT, and HEXEWKB.)
Indeed, the value is None and is dumped by JSONField into "null". The initial value should be jsonfield.forms.InvalidJSONInput(""). It can be set here if undefined: https://github.com/makinacorpus/django-geojson/blob/master/djgeojson/fields.py#L51
None
JSONField
"null"
jsonfield.forms.InvalidJSONInput("")
The text was updated successfully, but these errors were encountered:
Can be set for model fields as well.
Sorry, something went wrong.
Actually, it should be set for model fields as well because a field with blank=True will raise the error above.
blank=True
Can be done with https://docs.djangoproject.com/en/4.0/howto/custom-model-fields/#converting-values-to-python-objects
No branches or pull requests
Hi!
Thanks for this package! When used with https://github.com/makinacorpus/django-leaflet and no initial value,
GeoJSONFormField
raises the follow error:Indeed, the value is
None
and is dumped byJSONField
into"null"
. The initial value should bejsonfield.forms.InvalidJSONInput("")
. It can be set here if undefined: https://github.com/makinacorpus/django-geojson/blob/master/djgeojson/fields.py#L51The text was updated successfully, but these errors were encountered: