django-location-field icon indicating copy to clipboard operation
django-location-field copied to clipboard

wrong leaflet.js url when using custom form

Open ajendrex opened this issue 5 years ago • 0 comments

Hello,

I'm using a PlainLocationField which works well when using the default modelform in django-admin. Now I'm trying this custom form:

class PersonaNaturalForm(forms.ModelForm):
    geoloc = PlainLocationField(
        label='Ubicación',
        based_fields=['commune'],
        initial='-33.43993619197046,-70.6801986694336',
    )

but the page doesn't load the widget, because the url to get leaflet.js changed from localhost:8000/static/location_field/leaflet.js to localhost:8000/leaflet.js

any ideas?

thanks, H.

ajendrex avatar Aug 09 '19 18:08 ajendrex