class HomeForm(forms.Form): name = forms.CharField( min_length=1, max_length=255, strip=True, widget=forms.TextInput(attrs={'class': 'form-control'}) ) lat = forms.FloatField( widget=forms.HiddenInput() ) lng = forms.FloatField( widget=forms.HiddenInput() ) radius = forms.IntegerField( max_value='1000000000', min_value='5', widget=forms.NumberInput(attrs={'class': 'form-control'}), initial=50 ) module = forms.ModelChoiceField( widget=forms.RadioSelect, queryset=Module.objects.all(), empty_label='モジュールを選択', required=True ) class Meta: labels = { 'radius': 'Radius', 'name': 'Name', 'module': 'Module' }
class ClusterPointsForm(forms.Form): number_of_clusters = forms.IntegerField( label='Number of Clusters to Plot', min_value=1, max_value=10, required=False, widget=forms.NumberInput(attrs={'class': 'form-control mr-sm-1'}))
class QuantileSearchForm(forms.Form): quantile_value = forms.DecimalField( label='Search Quantile Value', required=False, decimal_places=2, min_value=0, max_value=1, widget=forms.NumberInput(attrs={'class': 'form-control mr-sm-1'}))
class SearchForm(forms.Form): distance = forms.IntegerField(widget=forms.NumberInput( attrs={ 'class': 'hidden', 'required': 'required' })) address = forms.CharField(widget=forms.TextInput(attrs={ 'class': 'hidden', 'required': 'required' })) days = forms.IntegerField(widget=forms.NumberInput(attrs={ 'class': 'hidden', 'required': 'required' })) event_types = forms.MultipleChoiceField( choices=Event.EVENT_TYPE_CHOICES, widget=CheckboxSelectMultipleULAttrs( ulattrs='class="list-unstyled hidden event-type-list"'))
class Meta: widgets = { 'name': forms.TextInput(attrs={'size': 13}), 'phone_number': forms.NumberInput(attrs={'size': 8}) }
class Meta: model = Town # fields = "__all__" fields = [ "codeTown", "nameTown", "surface", "population", "townPostalcode", "codeRegion", "codeDepartement", "centerCoordinateLat", "centerCoordinateLong" ] widgets = { 'codeTown': forms.TextInput( attrs={ 'class': 'm-2 border border-2 border-green-200 focus:outline-none ' 'focus:ring-2 focus:ring-green-600 focus:border-transparent ' 'text-gray-400 font-bold py-2 px-4 rounded-full' }), 'nameTown': forms.TextInput( attrs={ 'placeholder': 'Un nouveau nom ?', 'class': 'm-2 border border-2 border-green-200 focus:outline-none ' 'focus:ring-2 focus:ring-green-600 focus:border-transparent ' 'text-gray-400 font-bold py-2 px-4 rounded-full' }), 'codeRegion': forms.Select( attrs={ 'class': 'm-2 border border-2 border-green-200 focus:outline-none ' 'focus:ring-2 focus:ring-green-600 focus:border-transparent ' 'text-gray-400 font-bold py-2 px-4 rounded-full' }), 'codeDepartement': forms.Select( attrs={ 'class': 'm-2 border border-2 border-green-200 focus:outline-none ' 'focus:ring-2 focus:ring-green-600 focus:border-transparent ' 'text-gray-400 font-bold py-2 px-4 rounded-full' }), 'townPostalcode': forms.TextInput( attrs={ 'class': 'm-2 border border-2 border-green-200 focus:outline-none ' 'focus:ring-2 focus:ring-green-600 focus:border-transparent ' 'text-gray-400 font-bold py-2 px-4 rounded-full' }), 'surface': forms.NumberInput( attrs={ 'class': 'm-2 border border-2 border-green-200 focus:outline-none ' 'focus:ring-2 focus:ring-green-600 focus:border-transparent ' 'text-gray-400 font-bold py-2 px-4 rounded-full' }), 'centerCoordinateLat': forms.NumberInput( attrs={ 'class': 'm-2 border border-2 border-green-200 focus:outline-none ' 'focus:ring-2 focus:ring-green-600 focus:border-transparent ' 'text-gray-400 font-bold py-2 px-4 rounded-full' }), 'centerCoordinateLong': forms.NumberInput( attrs={ 'class': 'm-2 border border-2 border-green-200 focus:outline-none ' 'focus:ring-2 focus:ring-green-600 focus:border-transparent ' 'text-gray-400 font-bold py-2 px-4 rounded-full' }), 'population': forms.NumberInput( attrs={ 'class': 'm-2 border border-2 border-green-200 focus:outline-none ' 'focus:ring-2 focus:ring-green-600 ' 'focus:border-transparent text-gray-400 font-bold py-2 ' 'px-4 rounded-full' }), # 'center': forms.OSMWidget(attrs={'map_width': 800, 'map_height': 500}), }
class SearchProbeExpressionForm(forms.Form): search_value = forms.IntegerField( label='Search Probe Expression (ProbeName)', required=False, widget=forms.NumberInput(attrs={'class': 'form-control mr-sm-1'}))