From cf6346fdf00594b4b39930d7f6668eadae8c5ec7 Mon Sep 17 00:00:00 2001 From: reverend Date: Sun, 4 Apr 2021 16:56:18 +0200 Subject: [PATCH] Fixed #49 --- django_lostplaces/lostplaces/forms.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/django_lostplaces/lostplaces/forms.py b/django_lostplaces/lostplaces/forms.py index 57a3939..51fbe48 100644 --- a/django_lostplaces/lostplaces/forms.py +++ b/django_lostplaces/lostplaces/forms.py @@ -67,16 +67,16 @@ class PlaceForm(forms.ModelForm): class Meta: model = Place fields = '__all__' - exclude = ['submitted_by', 'latitude', 'longitute'] + exclude = ['submitted_by'] - latitude = forms.IntegerField( - widget=forms.NumberInput(attrs={'min':-90,'max': 90,'type': 'number'}) + latitude = forms.DecimalField( + widget=forms.NumberInput(attrs={'min':-90,'max': 90,'type': 'number', 'step': 'any'}) ) - longitude = forms.IntegerField( - widget=forms.NumberInput(attrs={'min':-180,'max': 180,'type': 'number'}) - ) - + longitude = forms.DecimalField( + widget=forms.NumberInput(attrs={'min':-180,'max': 180,'type': 'number', 'step': 'any'}) + ) + class PlaceImageForm(forms.ModelForm): class Meta: model = PlaceImage