#25708: cannot annotate with geometry value ----------------------------+-------------------------------------- Reporter: sir-sigurd | Owner: sir-sigurd Type: Bug | Status: assigned Component: GIS | Version: 1.8 Severity: Normal | Resolution: Keywords: | Triage Stage: Accepted Has patch: 1 | Needs documentation: 0 Needs tests: 0 | Patch needs improvement: 0 Easy pickings: 0 | UI/UX: 0 ----------------------------+--------------------------------------
Comment (by jarshwah): I'm suggesting that `GeomValue` could be made public. > but IMO if SomeField() accepts some_value then Value(some_value, output_field=SomeField()) should be valid. Not so. The first argument to `Value` needs to be convertible by the backend driver to a param. `Value(Point(1, 1), output_field=X)` generates `"%s", (Point(1, 1), )`. The `output_field` is only really responsible for converting the value returned from the database into a useable model field, it doesn't take responsibility for serialising the value to be sent to the database. It *could* be used for serialisation but it doesn't for `Value`. -- Ticket URL: <https://code.djangoproject.com/ticket/25708#comment:11> Django <https://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-updates+unsubscr...@googlegroups.com. To post to this group, send email to django-updates@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/068.e7c24a1bfba1eaef16a56c7d2b489afb%40djangoproject.com. For more options, visit https://groups.google.com/d/optout.