class SegmentChangeGeomForm(forms.ModelForm): geom = forms.MultiLineStringField(widget=forms.OSMWidget( attrs={ 'default_zoom': 16, 'map_width': 800, 'map_height': 500, })) class Meta: model = Segment fields = ('geom', )
class LineForm(forms.ModelForm): class Meta: model = Line fields = ['name', 'geom', 'description', 'theme', 'popup_image', 'popup_audio_file', 'popup_audio_title', 'popup_audio_slug', 'banner_image', 'banner_image_copyright', 'weight', 'tags', 'published',] help_texts = { 'popup_audio_title': _('If you have added an audio file to the popup, make sure you give it a title as well'), 'description': _('A short description of the location.') } geom = forms.MultiLineStringField(widget=MapBoxGLWidget(attrs={'config': config}), label=_('Line'))
class SegmentForm(forms.ModelForm): geom = forms.MultiLineStringField(widget=forms.OSMWidget( attrs={ 'map_width': 800, 'map_height': 500, 'default_lat': 50.45466, 'default_lon': 30.5238, 'default_zoom': 10 })) class Meta: model = Segment fields = ('district', 'geom')
class LineStringForm(forms.Form): f = forms.MultiLineStringField()