drought_backup/dashboard/form.py

35 lines
1.1 KiB
Python
Raw Normal View History

2018-07-06 09:47:36 +00:00
from django.forms import forms
2018-12-18 09:16:06 +00:00
from dashboard.models import Spi, Hydro, Landuse, Finance
2018-07-06 09:47:36 +00:00
2018-07-06 12:53:41 +00:00
2018-07-06 10:27:06 +00:00
class SpiForm(forms.Model):
class Meta:
model = Spi
2018-07-06 12:53:41 +00:00
fields = ['code', 'longitude', 'latitude', 'year', 'month', 'mean_precipitation', 'mean_temperature']
2018-07-06 11:59:04 +00:00
class HydroForm(forms.Model):
class Meta:
model = Hydro
2018-07-06 12:53:41 +00:00
fields = ['name', 'date', 'average_water_level', 'average_flow_rate', 'precipitation']
2018-07-06 11:59:04 +00:00
class LanduseForm(forms.Model):
class Meta:
model = Landuse
2018-07-06 12:53:41 +00:00
fields = ['name', 'date', 'Cultivated_land_area', 'Irrigated_land', 'eatch_land', 'eatch_Irrigated_land']
class FinanceForm(forms.Model):
class Meta:
model = Finance
fields = ['region', 'level', 'date', 'financial_revenue', 'tax_revenue', 'value_added_tax', 'sales_tax',
'corporate_income_tax', 'individual_income_tax', 'resource_tax', 'urban_maintenance_construction_tax',
'property_tax', 'stamp_duty', 'urban_land_use_tax', 'land_value_added_tax', 'vehicle_vessel_tax',
'arable_land_occupancy_tax', 'deed_tax', 'tobacco_tax', 'non_tax_revenue']
2018-07-06 13:31:05 +00:00