2018-07-06 09:47:36 +00:00
|
|
|
from django.forms import forms
|
|
|
|
|
2018-07-06 13:31:05 +00:00
|
|
|
from dashboard.models import Country, Spi, Hydro, Landuse, Finance, Popu
|
2018-07-06 09:47:36 +00:00
|
|
|
|
|
|
|
|
|
|
|
class CountryForm(forms.Model):
|
|
|
|
class Meta:
|
|
|
|
model = Country
|
2018-07-06 12:53:41 +00:00
|
|
|
fields = ['name', 'parent_name', 'level', 'datetime', 'area', 'arable_land_area', 'population',
|
|
|
|
'agricultural_population', 'gross_national_product', 'total_agricultural_output',
|
|
|
|
'arable_land_per_capita']
|
|
|
|
|
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
|
|
|
|
|
|
|
|
|
|
|
class PopuForm(forms.Model):
|
|
|
|
class Meta:
|
|
|
|
model = Popu
|
|
|
|
fields = ['region', 'date', 'permanent_population', 'households', 'census_register_population', 'male', 'female_sex','birth_rate','mortality','growth_rate','urbanization_rate']
|