Text fields shouldn't have null=True. (#94)

This commit is contained in:
Anna Sidwell 2018-09-22 19:09:01 +01:00
parent 3a17029dbd
commit ff445e166d
5 changed files with 388 additions and 97 deletions

View File

@ -0,0 +1,27 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.11.15 on 2018-09-22 17:17
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('files', '0004_auto_20180530_0308'),
]
operations = [
migrations.AlterField(
model_name='imagefile',
name='caption',
field=models.CharField(blank=True, default='', max_length=240, verbose_name='Image caption'),
preserve_default=False,
),
migrations.AlterField(
model_name='imagefile',
name='credit',
field=models.CharField(blank=True, default='', max_length=240, verbose_name='Image credit'),
preserve_default=False,
),
]

View File

@ -28,15 +28,11 @@ class ImageFile(BaseFile):
caption = models.CharField(
verbose_name=_("Image caption"),
max_length=240,
default=None,
null=True,
blank=True,
)
credit = models.CharField(
verbose_name=_("Image credit"),
max_length=240,
default=None,
null=True,
blank=True,
)

View File

@ -0,0 +1,79 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.11.15 on 2018-09-22 17:43
from __future__ import unicode_literals
from django.db import migrations, models
import multiselectfield.db.fields
from apps.map.models import CaseStudy
string_fields = [
'additional_technical_details',
'associated_infrastructure',
'biomass_detail',
'community_voices',
'contractor_or_supplier_of_technology',
'direct_comms',
'entry_name',
'full_description',
'generation_equipment_supplier',
'generation_technology',
'generation_technology_other',
'identified_partnerships',
'isolated_or_widespread',
'key_actors_involved',
'land_ownership',
'land_ownership_details',
'media_coverage_independent',
'media_coverage_mainstream',
'minerals_or_commodities',
'minerals_or_commodities_other',
'name_of_territory_or_area',
'negative_case_reasons',
'negative_case_reasons_other',
'negative_socioenvironmental_impacts',
'obstacles_and_hindrances',
'positive_case_type',
'potential_partnerships',
'power_technology',
'power_technology_other',
'project_status',
'project_status_detail',
'projected_production_of_commodities',
'sector_of_economy',
'size_of_concessions',
'social_media_links',
'socioeconomic_benefits',
'total_investment',
'type_of_ecosystem',
'type_of_extraction',
'use_in_energy_economy',
'use_in_energy_economy_other',
'video_caption',
'video_credit',
'when_did_organising_start',
'who_has_been_involved',
]
def remove_nulls(apps, schema_editor):
# We can't import the Person model directly as it may be a newer
# version than this migration expects. We use the historical version.
study = apps.get_model('map', 'CaseStudy')
for study in CaseStudy.objects.all():
for field in string_fields:
if study._meta.get_field(field) == None:
setattr(study, field, '')
study.save()
class Migration(migrations.Migration):
dependencies = [
('map', '0068_casestudydraft_created'),
]
operations = [
migrations.RunPython(remove_nulls),
]

View File

@ -0,0 +1,266 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.11.15 on 2018-09-22 18:06
from __future__ import unicode_literals
from django.db import migrations, models
import multiselectfield.db.fields
class Migration(migrations.Migration):
dependencies = [
('map', '0069_remove_null_from_text_fields'),
]
operations = [
migrations.AlterField(
model_name='casestudy',
name='additional_technical_details',
field=models.CharField(blank=True, help_text='Add any additional details such as: length, from-to, voltage, substations etc', max_length=512, verbose_name='Additional technical or economic details'),
),
migrations.AlterField(
model_name='casestudy',
name='associated_infrastructure',
field=models.CharField(blank=True, help_text='List any associated infrastructure in the locality (e.g. tailings dams/mine waste storage and treatment facilities; ore processing facilities; smelting facilities; hydroelectric dams/energy infrastructure; transport infrastructure e.g. roads or rail.', max_length=256, verbose_name='Associated infrastructure in the locality'),
),
migrations.AlterField(
model_name='casestudy',
name='biomass_detail',
field=models.CharField(blank=True, help_text='If you selected biogas or biomass, please describe the feedstock (where the fuel came from e.g. corn, algae, anaerobic digestion, commercial waste etc)', max_length=200, verbose_name='Description of feedstock'),
),
migrations.AlterField(
model_name='casestudy',
name='community_voices',
field=models.TextField(blank=True, help_text='Add any direct quotes from members of the community that relate to this project', verbose_name='Community Voices'),
),
migrations.AlterField(
model_name='casestudy',
name='contractor_or_supplier_of_technology',
field=models.CharField(blank=True, help_text='List companies that act as contractors or suppliers of technology related to energy storage.', max_length=256, verbose_name='Contractor and/or supplier of technology'),
),
migrations.AlterField(
model_name='casestudy',
name='direct_comms',
field=models.TextField(blank=True, help_text='Add any reports of direct communication between community members and representatives of developers/companies/investors.', verbose_name='Reports of direct communications'),
),
migrations.AlterField(
model_name='casestudy',
name='discharge_time',
field=models.DecimalField(blank=True, decimal_places=3, help_text='Enter the time it takes to discharge from full capacity at maximum power output (in hours).', max_digits=6, null=True, verbose_name='Time for discharge from full capacity'),
),
migrations.AlterField(
model_name='casestudy',
name='energy_storage_capacity',
field=models.DecimalField(blank=True, decimal_places=3, help_text='Enter the total capacity of the energy storage system in kilowatt-hours (kWh).', max_digits=20, null=True, verbose_name='Energy storage capacity'),
),
migrations.AlterField(
model_name='casestudy',
name='entry_name',
field=models.CharField(help_text='Enter the name of the entry. This should usually be the name of project.', max_length=128, verbose_name='Entry Name'),
),
migrations.AlterField(
model_name='casestudy',
name='full_description',
field=models.TextField(help_text='Describe the project in full. Separate paragraphs with a new line Please add as much detail as you feel is necessary here.', verbose_name='Full Description'),
),
migrations.AlterField(
model_name='casestudy',
name='generation_equipment_supplier',
field=models.TextField(blank=True, help_text='Enter the supplier of the generation equipment. (E.g. Siemens)', verbose_name='Generation equipment supplier'),
),
migrations.AlterField(
model_name='casestudy',
name='generation_technology',
field=models.CharField(blank=True, choices=[('Wind energy', (('SSWE', 'Small-scale (less than 500kW)'), ('LSWE', 'Large-scale (more than 500kW)'))), ('Photovoltaic electricity', (('SSPV', 'Small-scale (less than 500kW)'), ('LSPV', 'Large-scale (more than 500kW)'))), ('Hydroelectric', (('SHYD', 'Small-scale (less than 1MW)'), ('MHYD', 'Medium-scale (between 1-20MW)'), ('LHYD', 'Large-scale (more than 20MW - often not considered renewable)'))), ('STHE', 'Solar thermal electricity (e.g using parabolic reflectors)'), ('GEOT', 'Geothermal electricity'), ('BIOG', 'Biogas turbine'), ('OTHB', 'Other biomass (including liquid/solid biofuel)'), ('OTHR', 'Other (tidal, wave etc)')], help_text='Select the type of renewable energy generation that most applies to this case study.', max_length=4, verbose_name='Generation technology'),
),
migrations.AlterField(
model_name='casestudy',
name='generation_technology_other',
field=models.CharField(blank=True, help_text='If you selected other, please specify the generation technology (e.g. tidal, wave etc)', max_length=200, verbose_name='Other generation type'),
),
migrations.AlterField(
model_name='casestudy',
name='identified_partnerships',
field=models.CharField(blank=True, help_text='Are you looking for partnerships or have any clearly identified need? If so, please describe it here.', max_length=256, verbose_name='Identified partnerships'),
),
migrations.AlterField(
model_name='casestudy',
name='isolated_or_widespread',
field=models.TextField(blank=True, help_text='Is this an isolated project or are there similar projects in the same geographic area? If there are more, can you describe them? Are there any significant cumulative synergistic effects?', verbose_name='Describe if the project is isolated or commonplace.'),
),
migrations.AlterField(
model_name='casestudy',
name='key_actors_involved',
field=models.TextField(blank=True, verbose_name='Key actors involved (individual/organisational)'),
),
migrations.AlterField(
model_name='casestudy',
name='land_ownership',
field=models.CharField(choices=[('PRI', 'Private Land'), ('PUB', 'Public Land'), ('COM', 'Community Land'), ('OTH', 'Other')], help_text='What type of ownership does the land fall under?', max_length=3, verbose_name='Land ownership'),
),
migrations.AlterField(
model_name='casestudy',
name='land_ownership_details',
field=models.CharField(blank=True, help_text='Please specify details about land ownership', max_length=256, verbose_name='Land ownership details'),
),
migrations.AlterField(
model_name='casestudy',
name='maximum_power_output',
field=models.DecimalField(blank=True, decimal_places=3, help_text='Enter the maximum power output of the storage system in kilowatts (kW).', max_digits=12, null=True, verbose_name='Maximum power output'),
),
migrations.AlterField(
model_name='casestudy',
name='media_coverage_independent',
field=models.TextField(blank=True, help_text='Provide any links to grassroots/independent media coverage.', verbose_name='Independent grassroots reports'),
),
migrations.AlterField(
model_name='casestudy',
name='media_coverage_mainstream',
field=models.TextField(blank=True, help_text='Provide any links to mainstream media coverage.', verbose_name='Links to media reports'),
),
migrations.AlterField(
model_name='casestudy',
name='minerals_or_commodities',
field=models.CharField(blank=True, choices=[('ALU', 'Aluminium (Bauxite)'), ('ARS', 'Arsenic'), ('BER', 'Beryllium'), ('CAD', 'Cadmium'), ('CHR', 'Chromium'), ('COK', 'Coking'), ('COA', 'Coal (for steel)'), ('COP', 'Copper'), ('GAL', 'Gallium'), ('GER', 'Germanium'), ('GLD', 'Gold'), ('HRE', 'Heavy Rare Earth Elements (Gadolinium, Terbium, Dysprosium, Holmium, Erbium, Thulium, Ytterbium, Lutetium, Yttrium, Scandium)'), ('IRN', 'Iron'), ('LRE', 'Light Rare Earth Elements (Lanthanum, Cerium, Praseodymium, Neodymium, Promethium, Samarium, Europium)'), ('LED', 'Lead'), ('LIT', 'Lithium'), ('MAN', 'Manganese'), ('MER', 'Mercury'), ('MOL', 'Molybdenum'), ('NIC', 'Nickel'), ('NIO', 'Niobium'), ('PGM', 'Platinum group metals (ruthenium, rhodium, palladium, osmium, iridium, and platinum)'), ('RHE', 'Rhenium'), ('SIL', 'Silicon'), ('SIV', 'Silver'), ('TAN', 'Tantalum'), ('TEL', 'Tellurium'), ('THA', 'Thallium'), ('TIN', 'Tin'), ('TIT', 'Titanium'), ('TUN', 'Tungsten'), ('VAN', 'Vanadium'), ('ZNC', 'Zinc'), ('OTR', 'Other')], help_text='Select the mineral commodity that is primarily mined in this project', max_length=3, verbose_name='Mineral commodity/commodities'),
),
migrations.AlterField(
model_name='casestudy',
name='minerals_or_commodities_other',
field=models.CharField(blank=True, help_text="Enter the mineral commodity that isn't in the list.", max_length=64, verbose_name='Other mineral commodity'),
),
migrations.AlterField(
model_name='casestudy',
name='name_of_territory_or_area',
field=models.CharField(blank=True, max_length=512, verbose_name='Name of territory or area'),
),
migrations.AlterField(
model_name='casestudy',
name='negative_case_reasons',
field=multiselectfield.db.fields.MultiSelectField(blank=True, choices=[('VOLR', 'Violation of land rights'), ('VOHR', 'Violation of fundamental human rights, indigenous rights and/or other collective rights'), ('EIMP', 'Environmental impacts (severe impacts on ecosystems / violation of laws, plans or programs of environmental conservation or territorial governance systems etc.'), ('NCUL', 'Negative cultural impacts (erosion/destruction of bio-cultural heritage, impacts on sacred land etc)'), ('AGGR', 'Aggression/threats to community members opposed to the project, collaboration with organized crime etc'), ('ALAB', 'Abusive labour practices'), ('CRUP', 'Corruption and/or irregular permitting or contracting, conflicts of interest etc'), ('OTHR', 'Other reasons')], max_length=39, verbose_name='Reasons this is a negative case study'),
),
migrations.AlterField(
model_name='casestudy',
name='negative_case_reasons_other',
field=models.CharField(blank=True, help_text='Please include other reasons, noting that we aim to focus on projects with substantive negative impacts on vulnerable groups.', max_length=512, verbose_name='Other reason for negative case'),
),
migrations.AlterField(
model_name='casestudy',
name='negative_socioenvironmental_impacts',
field=models.TextField(blank=True, help_text='Provide a detailed description of the negative socio-environmental impacts (please provide all relevant details, such as type of ecosystem and presence of any existing reserve in the area, , specific communities affected by the project, total geographic footprint of the project, and tenure system affected in the case of land grabs, kind of permits that were irregularly issued if this is the case.', verbose_name='Describe the negative socio-environmental impacts'),
),
migrations.AlterField(
model_name='casestudy',
name='obstacles_and_hindrances',
field=models.CharField(blank=True, help_text='List any obstacles or hindrances experienced in the course of the project', max_length=512, verbose_name='Obstacles and hindrances'),
),
migrations.AlterField(
model_name='casestudy',
name='positive_case_type',
field=models.CharField(blank=True, choices=[('CREP', 'Community renewable energy project'), ('EACP', 'Energy as a commons project'), ('PSEP', 'Public/state (federal, state, municipal) energy project'), ('CORS', 'A case of responsible sourcing/supply chain/lifecycle management')], help_text='Select the most relevant type of positive case', max_length=4, verbose_name='What kind of positive case is this entry about?'),
),
migrations.AlterField(
model_name='casestudy',
name='potential_partnerships',
field=models.CharField(blank=True, help_text='Are you looking for partnerships or do you have any clearly identified need? If so, please describe it here.', max_length=512, verbose_name='Describe potential partnerships'),
),
migrations.AlterField(
model_name='casestudy',
name='power_technology',
field=models.CharField(blank=True, choices=[('PT', 'Power transmission (grid lines, substations etc)'), ('ES', 'Energy storage (pumped storage, compressed air, battery systems etc'), ('OT', 'Others')], help_text='Select the related energy technology.', max_length=2, verbose_name='Power technology'),
),
migrations.AlterField(
model_name='casestudy',
name='power_technology_other',
field=models.CharField(blank=True, help_text="If you answered 'others', please specify the power technologies.", max_length=128, verbose_name='Other power technology'),
),
migrations.AlterField(
model_name='casestudy',
name='project_status',
field=models.CharField(choices=[('EXSTNG', 'Existing Project'), ('UCONST', 'Under Construction'), ('PROJCD', 'Projected Project')], help_text='What is the status of the current project?', max_length=6, verbose_name='Status of Project'),
),
migrations.AlterField(
model_name='casestudy',
name='project_status_detail',
field=models.TextField(blank=True, help_text="Describe the current status of the project, expanding beyond 'existing', 'under construction' etc", verbose_name='Current status of the project'),
),
migrations.AlterField(
model_name='casestudy',
name='projected_production_of_commodities',
field=models.CharField(blank=True, help_text="Describe the projected production of commodities per annum and overall (e.g. '40 million tonnes of iron ore per year, 200 million tonnes over 5 year life of mine'", max_length=256, verbose_name='Projected production of key commodities'),
),
migrations.AlterField(
model_name='casestudy',
name='sector_of_economy',
field=models.CharField(choices=[('RN', 'Renewable Energy Generation'), ('PG', 'Power Grids'), ('SM', 'Supply of Minerals')], help_text='Which sector of the renewable energy economy is most relevant?', max_length=3, verbose_name='Sector of economy'),
),
migrations.AlterField(
model_name='casestudy',
name='size_of_concessions',
field=models.CharField(blank=True, help_text="Describe the size of concession(s) granted to company/companies (e.g. 'one concession encompassing 2,300 hectares')", max_length=200, verbose_name='Size of concessions'),
),
migrations.AlterField(
model_name='casestudy',
name='social_media_links',
field=models.TextField(blank=True, help_text='Add any links to social media accounts directly relating to the project.', max_length=500, verbose_name='Social media links'),
),
migrations.AlterField(
model_name='casestudy',
name='socioeconomic_benefits',
field=models.TextField(blank=True, help_text='Please expand on your response given in the full description on page one. We would expect benefits to go beyond emissions savings, paying rent for land, or complying with environmental or social legislation', verbose_name='Socio-economic benefits'),
),
migrations.AlterField(
model_name='casestudy',
name='start_year',
field=models.IntegerField(blank=True, choices=[(1978, 1978), (1979, 1979), (1980, 1980), (1981, 1981), (1982, 1982), (1983, 1983), (1984, 1984), (1985, 1985), (1986, 1986), (1987, 1987), (1988, 1988), (1989, 1989), (1990, 1990), (1991, 1991), (1992, 1992), (1993, 1993), (1994, 1994), (1995, 1995), (1996, 1996), (1997, 1997), (1998, 1998), (1999, 1999), (2000, 2000), (2001, 2001), (2002, 2002), (2003, 2003), (2004, 2004), (2005, 2005), (2006, 2006), (2007, 2007), (2008, 2008), (2009, 2009), (2010, 2010), (2011, 2011), (2012, 2012), (2013, 2013), (2014, 2014), (2015, 2015), (2016, 2016), (2017, 2017), (2018, 2018), (2019, 2019), (2020, 2020), (2021, 2021), (2022, 2022), (2023, 2023), (2024, 2024), (2025, 2025), (2026, 2026), (2027, 2027), (2028, 2028), (2029, 2029), (2030, 2030), (2031, 2031), (2032, 2032), (2033, 2033), (2034, 2034), (2035, 2035), (2036, 2036), (2037, 2037), (2038, 2038), (2039, 2039), (2040, 2040), (2041, 2041), (2042, 2042), (2043, 2043), (2044, 2044), (2045, 2045), (2046, 2046), (2047, 2047), (2048, 2048), (2049, 2049), (2050, 2050), (2051, 2051), (2052, 2052), (2053, 2053), (2054, 2054), (2055, 2055), (2056, 2056), (2057, 2057), (2058, 2058)], help_text="Select the year the project was started. If the project hasn't begun, select the projected start year.", null=True, verbose_name='Start year'),
),
migrations.AlterField(
model_name='casestudy',
name='total_generation_capacity',
field=models.PositiveIntegerField(blank=True, help_text='Please enter the total generation capacity of the project in kW', null=True, verbose_name='Total generation capacity (in kW)'),
),
migrations.AlterField(
model_name='casestudy',
name='total_investment',
field=models.IntegerField(blank=True, help_text='The approximate total investment for the project in USD.', null=True, verbose_name='Total investment (in USD)'),
),
migrations.AlterField(
model_name='casestudy',
name='type_of_ecosystem',
field=multiselectfield.db.fields.MultiSelectField(blank=True, choices=[('MARINE', 'Marine (e.g. Ocean, Sea)'), ('FRESH', 'Freshwater (e.g. Freshwater, Lake)'), ('FOREST', 'Forest/Jungle'), ('AGRI', 'Agricultural Land'), ('GRASS', 'Grassland'), ('DESERT', 'Desert (Tundra, Ice or Sand)'), ('WETLND', 'Wetland (Marsh, Mangrove, Peat Soil)'), ('URBAN', 'Urban')], help_text='Select the most relevant type(s).', max_length=56, verbose_name='Type(s) of ecosystem'),
),
migrations.AlterField(
model_name='casestudy',
name='type_of_extraction',
field=models.CharField(blank=True, choices=[('SUR', 'Surface (open pit/open cast/open cut mining)'), ('SUB', 'Sub-surface (underground mining)'), ('SEA', 'Seabed mining'), ('URB', 'Urban mining/recycling')], max_length=3, verbose_name='Type of extraction'),
),
migrations.AlterField(
model_name='casestudy',
name='use_in_energy_economy',
field=models.CharField(blank=True, choices=[('WTM', 'Wind turbine manufacturing'), ('SPM', 'Solar panel manufacturing'), ('STM', 'Solar thermal system manufacturing'), ('HGM', 'Hydropower generator manufacturing'), ('GGM', 'Geothermal generator manufacturing'), ('ESS', 'Energy storage (inc. battery systems)'), ('OTR', 'Others')], help_text='Select the potential use of the minerals in the renewable energy economy', max_length=3, verbose_name='Potential use in renewable energy economy'),
),
migrations.AlterField(
model_name='casestudy',
name='use_in_energy_economy_other',
field=models.CharField(blank=True, max_length=128, verbose_name='Other use in energy economy'),
),
migrations.AlterField(
model_name='casestudy',
name='video_caption',
field=models.CharField(blank=True, max_length=240, verbose_name='Video caption'),
),
migrations.AlterField(
model_name='casestudy',
name='video_credit',
field=models.CharField(blank=True, max_length=240, verbose_name='Video credit(s)'),
),
migrations.AlterField(
model_name='casestudy',
name='when_did_organising_start',
field=models.CharField(blank=True, help_text='Before the project started? During project implementation? After project implementation? Describe in your own words.', max_length=512, verbose_name='When did local organising efforts begin?'),
),
migrations.AlterField(
model_name='casestudy',
name='who_has_been_involved',
field=models.TextField(blank=True, verbose_name='Which communities, groups and organisations have been involved?'),
),
]

View File

@ -317,7 +317,6 @@ class CaseStudy(models.Model):
verbose_name=_("Land ownership details"),
help_text=_("Please specify details about land ownership"),
max_length=256,
null=True,
blank=True,
)
@ -336,8 +335,6 @@ class CaseStudy(models.Model):
help_text=_("Select the most relevant type(s)."),
max_length=56,
choices=TYPE_OF_ECOSYSTEM_CHOICES,
default=None,
null=True,
blank=True
)
@ -376,9 +373,8 @@ class CaseStudy(models.Model):
help_text=_("Select the year the project was started. \
If the project hasn't begun, select the projected start year."),
choices=YEAR_CHOICES,
default=None,
null=True,
blank=True
blank=True,
null=True
)
# 1.8
@ -469,8 +465,6 @@ class CaseStudy(models.Model):
verbose_name=_("Video caption"),
max_length=240,
blank=True,
default=None,
null=True,
)
# 1.16.3
@ -478,24 +472,20 @@ class CaseStudy(models.Model):
verbose_name=_("Video credit(s)"),
max_length=240,
blank=True,
default=None,
null=True,
)
# 1.17.1
media_coverage_mainstream = models.TextField(
verbose_name=_("Links to media reports"),
help_text=_("Provide any links to mainstream media coverage."),
default=None,
null=True,
blank=True,
)
# 1.17.2
media_coverage_independent = models.TextField(
verbose_name=_("Independent grassroots reports"),
help_text=_("Provide any links to grassroots/independent media coverage."),
default=None,
null=True,
blank=True,
)
# 1.18.1
@ -503,9 +493,7 @@ class CaseStudy(models.Model):
verbose_name=_("Community Voices"),
help_text=_("Add any direct quotes from members of the community that \
relate to this project"),
default=None,
null=True,
blank=True
blank=True,
)
# 1.18.2
@ -513,9 +501,7 @@ class CaseStudy(models.Model):
verbose_name=_("Reports of direct communications"),
help_text=_("Add any reports of direct communication between community members and \
representatives of developers/companies/investors."),
default=None,
null=True,
blank=True
blank=True,
)
# 1.18.3
@ -523,9 +509,7 @@ class CaseStudy(models.Model):
verbose_name=_("Social media links"),
help_text=_("Add any links to social media accounts directly relating to the project."),
max_length=500,
default=None,
null=True,
blank=True
blank=True,
)
##
@ -539,8 +523,6 @@ class CaseStudy(models.Model):
help_text=_("Select the type of renewable energy generation that most applies to this case study."),
max_length=4,
choices=GENERATION_TECHNOLOGY_CHOICES,
default=None,
null=True,
blank=True
)
@ -551,8 +533,6 @@ class CaseStudy(models.Model):
help_text=_("If you selected biogas or biomass, please describe the feedstock (where the fuel came from e.g. \
corn, algae, anaerobic digestion, commercial waste etc)"),
max_length=200,
default=None,
null=True,
blank=True
)
@ -561,8 +541,6 @@ class CaseStudy(models.Model):
verbose_name=_("Other generation type"),
help_text=_("If you selected other, please specify the generation technology (e.g. tidal, wave etc)"),
max_length=200,
default=None,
null=True,
blank=True
)
@ -570,9 +548,8 @@ class CaseStudy(models.Model):
total_generation_capacity = models.PositiveIntegerField(
verbose_name=_("Total generation capacity (in kW)"),
help_text=_("Please enter the total generation capacity of the project in kW"),
default=None,
null=True,
blank=True,
null=True
)
# 2.1.3
@ -580,8 +557,6 @@ class CaseStudy(models.Model):
generation_equipment_supplier = models.TextField(
verbose_name=_("Generation equipment supplier"),
help_text=_("Enter the supplier of the generation equipment. (E.g. Siemens)"),
default=None,
null=True,
blank=True
)
@ -589,9 +564,8 @@ class CaseStudy(models.Model):
total_investment = models.IntegerField(
verbose_name=_("Total investment (in USD)"),
help_text=_("The approximate total investment for the project in USD."),
default=None,
null=True,
blank=True
blank=True,
null=True
)
# 2.1.5
@ -608,8 +582,6 @@ class CaseStudy(models.Model):
help_text=_("Select the related energy technology."),
max_length=2,
choices=POWER_TECHNOLOGY_CHOICES,
default=None,
null=True,
blank=True
)
@ -618,8 +590,6 @@ class CaseStudy(models.Model):
verbose_name=_("Other power technology"),
help_text=_("If you answered 'others', please specify the power technologies."),
max_length=128,
default=None,
null=True,
blank=True
)
@ -629,9 +599,8 @@ class CaseStudy(models.Model):
help_text=_("Enter the total capacity of the energy storage system in kilowatt-hours (kWh)."),
max_digits=20,
decimal_places=3,
default=None,
blank=True,
null=True,
blank=True
)
# 2.2.2.1
@ -640,9 +609,8 @@ class CaseStudy(models.Model):
help_text=_('Enter the maximum power output of the storage system in kilowatts (kW).'),
max_digits=12,
decimal_places=3,
default=None,
blank=True,
null=True,
blank=True
)
# 2.2.2.2
@ -651,9 +619,8 @@ class CaseStudy(models.Model):
help_text=_('Enter the time it takes to discharge from full capacity at maximum power output (in hours).'),
max_digits=6,
decimal_places=3,
default=None,
blank=True,
null=True,
blank=True
)
# 2.2.3
@ -661,8 +628,6 @@ class CaseStudy(models.Model):
verbose_name=_('Contractor and/or supplier of technology'),
help_text=_('List companies that act as contractors or suppliers of technology related to energy storage.'),
max_length=256,
default=None,
null=True,
blank=True
)
@ -670,9 +635,9 @@ class CaseStudy(models.Model):
approximate_total_investment = models.PositiveIntegerField(
verbose_name=_('Approximate total investment'),
help_text=_('Enter the approximate total investment in USD ($).'),
blank=True,
default=None,
null=True,
blank=True
)
# 2.2.5
@ -680,8 +645,6 @@ class CaseStudy(models.Model):
verbose_name=_("Additional technical or economic details"),
help_text=_("Add any additional details such as: length, from-to, voltage, substations etc"),
max_length=512,
default=None,
null=True,
blank=True
)
@ -691,8 +654,6 @@ class CaseStudy(models.Model):
help_text=_("Select the mineral commodity that is primarily mined in this project"),
max_length=3,
choices=MINERAL_COMMODITY_CHOICES,
default=None,
null=True,
blank=True
)
@ -701,8 +662,6 @@ class CaseStudy(models.Model):
verbose_name=_("Other mineral commodity"),
help_text=_("Enter the mineral commodity that isn't in the list."),
max_length=64,
default=None,
null=True,
blank=True
)
@ -712,8 +671,6 @@ class CaseStudy(models.Model):
help_text=_("Select the potential use of the minerals in the renewable energy economy"),
max_length=3,
choices=USE_IN_ENERGY_ECONOMY_CHOICES,
default=None,
null=True,
blank=True
)
@ -721,8 +678,6 @@ class CaseStudy(models.Model):
use_in_energy_economy_other = models.CharField(
verbose_name=_('Other use in energy economy'),
max_length=128,
default=None,
null=True,
blank=True
)
@ -740,8 +695,6 @@ class CaseStudy(models.Model):
help_text=_("Describe the size of concession(s) granted to company/companies (e.g. 'one concession encompassing\
2,300 hectares')"),
max_length=200,
null=True,
default=None,
blank=True
)
@ -751,8 +704,6 @@ class CaseStudy(models.Model):
help_text=_("Describe the projected production of commodities per annum and overall (e.g. '40 million tonnes of\
iron ore per year, 200 million tonnes over 5 year life of mine'"),
max_length=256,
default=None,
null=True,
blank=True
)
@ -761,8 +712,6 @@ class CaseStudy(models.Model):
verbose_name=_("Type of extraction"),
max_length=3,
choices=TYPE_OF_EXTRACTION_CHOICES,
default=None,
null=True,
blank=True
)
@ -773,8 +722,6 @@ class CaseStudy(models.Model):
treatment facilities; ore processing facilities; smelting facilities; hydroelectric dams/energy infrastructure;\
transport infrastructure e.g. roads or rail."),
max_length=256,
default=None,
null=True,
blank=True
)
@ -788,8 +735,6 @@ class CaseStudy(models.Model):
help_text=_('Select the most relevant type of positive case'),
choices=POSITIVE_CASE_TYPE_CHOICES,
max_length=4,
default=None,
null=True,
blank=True,
)
@ -799,23 +744,19 @@ class CaseStudy(models.Model):
help_text=_('Please expand on your response given in the full description on page one. We would expect \
benefits to go beyond emissions savings, paying rent for land, or complying with environmental or social \
legislation'),
default=None,
null=True,
blank=True
)
# 3.1.3 + 3.2.5
key_actors_involved = models.TextField(
verbose_name=_('Key actors involved (individual/organisational)'),
blank=True, null=True
blank=True
)
# 3.1.4
project_status_detail = models.TextField(
verbose_name=_('Current status of the project'),
help_text=_("Describe the current status of the project, expanding beyond 'existing', 'under construction' etc"),
default=None,
null=True,
blank=True
)
@ -824,8 +765,6 @@ class CaseStudy(models.Model):
verbose_name=_('Obstacles and hindrances'),
help_text=_('List any obstacles or hindrances experienced in the course of the project'),
max_length=512,
default=None,
null=True,
blank=True
)
@ -835,8 +774,6 @@ class CaseStudy(models.Model):
help_text=_('Are you looking for partnerships or have any clearly identified need? If so, please describe it \
here.'),
max_length=256,
default=None,
null=True,
blank=True
)
@ -882,8 +819,6 @@ class CaseStudy(models.Model):
negative_case_reasons = MultiSelectField(
verbose_name=("Reasons this is a negative case study"),
choices=NEGATIVE_CASE_REASONS_CHOICES,
default=None,
null=True,
blank=True
)
@ -893,8 +828,6 @@ class CaseStudy(models.Model):
help_text=_("Please include other reasons, noting that we aim to focus on projects with substantive negative \
impacts on vulnerable groups."),
max_length=512,
default=None,
null=True,
blank=True
)
@ -906,8 +839,6 @@ class CaseStudy(models.Model):
, specific communities affected by the project, total geographic footprint of the project, and \
tenure system affected in the case of land grabs, kind of permits that were irregularly issued if \
this is the case."),
default=None,
null=True,
blank=True
)
@ -916,8 +847,6 @@ class CaseStudy(models.Model):
verbose_name=_("Describe if the project is isolated or commonplace."),
help_text=_("Is this an isolated project or are there similar projects in the same geographic area? If there \
are more, can you describe them? Are there any significant cumulative synergistic effects?"),
default=None,
null=True,
blank=True
)
@ -927,15 +856,13 @@ class CaseStudy(models.Model):
help_text=_("Before the project started? During project implementation? After project implementation? \
Describe in your own words."),
max_length=512,
default=None,
null=True,
blank=True
)
# 3.2.4.2
who_has_been_involved = models.TextField(
verbose_name=_("Which communities, groups and organisations have been involved?"),
blank=True, null=True
blank=True
)
# 3.2.4.3
@ -951,8 +878,6 @@ class CaseStudy(models.Model):
help_text=_("Are you looking for partnerships or do you have any clearly identified need? If so, please \
describe it here."),
max_length=512,
default=None,
null=True,
blank=True
)
@ -1009,8 +934,6 @@ class CaseStudy(models.Model):
name_of_territory_or_area = models.CharField(
verbose_name=_("Name of territory or area"),
max_length=512,
default=None,
null=True,
blank=True
)