Skip to content

Leaflet widget is not rendered automatically for forms.Forms #108

@faaizajaz

Description

@faaizajaz

Hi, and thanks for this fantastic project (and django-leaflet).

Using the leaflet widget on modelForms (where the model has a corresponding geom field, e.g. PointField()) works as expected, however when using forms.Form the behavior is not consistent.

The docs say that form widgets are rendered with Leaflet automatically if django-leaflet is available, but this does not seem to be the case.

Taking a simple example:

class SampleForm(forms.Form): location = djgeojson.fields.PointField()

From the docs, we expect that when this form is rendered, there will be a leaflet widget for the location field, which does not seem to work.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions