This commit is contained in:
reverend 2021-04-04 16:56:18 +02:00
parent d641d7b44d
commit cf6346fdf0

View File

@ -67,14 +67,14 @@ class PlaceForm(forms.ModelForm):
class Meta: class Meta:
model = Place model = Place
fields = '__all__' fields = '__all__'
exclude = ['submitted_by', 'latitude', 'longitute'] exclude = ['submitted_by']
latitude = forms.IntegerField( latitude = forms.DecimalField(
widget=forms.NumberInput(attrs={'min':-90,'max': 90,'type': 'number'}) widget=forms.NumberInput(attrs={'min':-90,'max': 90,'type': 'number', 'step': 'any'})
) )
longitude = forms.IntegerField( longitude = forms.DecimalField(
widget=forms.NumberInput(attrs={'min':-180,'max': 180,'type': 'number'}) widget=forms.NumberInput(attrs={'min':-180,'max': 180,'type': 'number', 'step': 'any'})
) )
class PlaceImageForm(forms.ModelForm): class PlaceImageForm(forms.ModelForm):