diff --git a/apps/files/migrations/0007_auto_20181201_2315.py b/apps/files/migrations/0007_auto_20181201_2315.py new file mode 100644 index 0000000..b7c4247 --- /dev/null +++ b/apps/files/migrations/0007_auto_20181201_2315.py @@ -0,0 +1,25 @@ +# Generated by Django 2.1.1 on 2018-12-01 23:15 + +from django.conf import settings +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + ('files', '0006_auto_20180928_1323'), + ] + + operations = [ + migrations.AlterField( + model_name='file', + name='user', + field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='file', to=settings.AUTH_USER_MODEL), + ), + migrations.AlterField( + model_name='imagefile', + name='user', + field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='imagefile', to=settings.AUTH_USER_MODEL), + ), + ] diff --git a/apps/map/forms.py b/apps/map/forms.py index 0ef783b..147adca 100644 --- a/apps/map/forms.py +++ b/apps/map/forms.py @@ -15,6 +15,32 @@ from .models import CaseStudy, SpatialRefSys, PointOfInterest from .widgets import JSONFileListWidget +SECTOR_HELP = { + 'RN': _("including electricity, heat or combined heat and power generation"), + 'PG': '', + 'ST': _('Biological, chemical, electrical, electromagnetic, electrochemical, mechanical including gravitational potential, thermal etc.'), + 'SM': _("including supply of minerals"), + 'MA': '', +} + +POWER_TECHNOLOGY_HELP = { + 'PT': _('Lines, transformers, machinery etc.'), + 'HN': _('District heating/cooling, etc.'), + 'OT': '', +} + +def add_explanatory_text(model_choices, explanatory_text): + return [ + ( + choice[0], + mark_safe('%s
%s' % + (choice[1], explanatory_text[choice[0]]) + ) + ) for choice in model_choices + ] + + + class MinimumZoomWidget(LeafletWidget): geometry_field_class = 'MinimumZoomField' @@ -63,8 +89,8 @@ class BaseCaseStudyForm(forms.models.ModelForm): self.helper.form_class = 'form-horizontal' self.helper.form_method = 'post' self.helper.form_action = 'add' - self.helper.label_class = 'col-lg-2' - self.helper.field_class = 'col-lg-8' + self.helper.label_class = 'col-md-3' + self.helper.field_class = 'col-md-9' self.helper.include_media = False class Meta: @@ -87,6 +113,16 @@ class ShortCaseStudyForm(BaseCaseStudyForm): self.helper.form_action = reverse('short-form') self.helper.add_input(Submit('submit', _('Submit'), css_class='btn-success center-block')) + # Duplicate code from long form, below... + self.fields['sector_of_economy'] = forms.ChoiceField( + widget=forms.RadioSelect(), + choices=add_explanatory_text( + CaseStudy.SECTOR_CHOICES, + SECTOR_HELP + ), + required=False + ) + class Meta(BaseCaseStudyForm.Meta): fields = [ 'entry_name', @@ -100,8 +136,7 @@ class ShortCaseStudyForm(BaseCaseStudyForm): 'location_context', 'type_of_ecosystem', 'describe_ecosystem', - 'people_affected_indigenous', - 'people_affected_other', + 'affected_communities', 'project_status', 'synopsis', 'full_description', @@ -177,56 +212,67 @@ class LongCaseStudyForm(BaseCaseStudyForm): initial=4326, ) - POSITIVE_CASE_TYPE_HELP = { - 'CREP': _("We are using the World Wind Energy Association's Community Power definition, \ - which is that a community project is one where at least \ - two of the following three criteria are met:
\ - 1. Local stakeholders own the majority or all of a project,
\ - 2. Voting control rests with the community-based organization,
\ - 3. The majority of social and economic benefits are distributed locally."), - 'EACP': _(""), - 'PSEP': _(""), - 'CORS': _("The extraction of non-renewable resources, such as iron, copper, \ - rare-earth elements or other minerals and metals used in \ - renewable technologies, directly from the Earth is by definition \ - an unsustainable practice. Despite this, the extraction of such elements \ - this way for use in the renewable energy transition is, to an extent, \ - a necessary evil in the immediate term. Bearing this in mind, \ - a case involving extraction may be considered 'positive' if it helps \ - to reduce, overall, the need for more extraction; if it drastically \ - reduces ecological harms often caused by mining and does not infringe \ - on areas of high biodiversity; and if it meets outstanding social \ - and human rights standards that are enjoyed and affirmed by \ - host communities and other stakeholders. Such social standards include: \ - ensuring communities, and especially indigenous peoples, \ - enjoy their right to Free Prior and Informed Consent, \ - which includes the right to reject projects; abiding by \ - the UN's guiding principles on Business and Human Rights; \ - full collaboration with the Extractive Industries Transparency Initiative, \ - assuring excellence in the transparency of project financing, \ - tax affairs and other transactions; the highest labour standards; \ - equitable distribution of any benefits accruing from mining; \ - respect for the rule of law and the constitutional rights of citizens \ - in host countries."), - } - def __init__(self, *args, **kwargs): super(LongCaseStudyForm, self).__init__(*args, **kwargs) - POSITIVE_CASE_TYPE_CHOICES = [ - (choice[0], mark_safe('%s
%s' % (choice[1], self.POSITIVE_CASE_TYPE_HELP[choice[0]]))) - for choice in CaseStudy.POSITIVE_CASE_TYPE_CHOICES - ] + self.fields['positive_case_type'].label = "" + self.fields['negative_case_reasons'].label = "" - self.fields['positive_case_type'] = forms.ChoiceField( + self.fields['sector_of_economy'] = forms.ChoiceField( widget=forms.RadioSelect(), - choices=POSITIVE_CASE_TYPE_CHOICES, + choices=add_explanatory_text( + CaseStudy.SECTOR_CHOICES, + SECTOR_HELP + ), + required=False + ) + + self.fields['power_technology'] = forms.ChoiceField( + widget=forms.RadioSelect(), + choices=add_explanatory_text( + CaseStudy.POWER_TECHNOLOGY_CHOICES, + POWER_TECHNOLOGY_HELP + ), required=False ) self.fields['project_owners'].required = True self.fields['shareholders'].required = True + + self.fields['socioeconomic_benefits'].label = \ + '' + \ + _('Socio-environmental impacts (negative and potentially positive)') + \ + '' + \ + '' + \ + _('Socio-environmental impacts (positive and potentially negative)') + \ + '' + \ + '' + \ + _('Socio-environmental impacts (positive and negative)') + \ + '' + + self.fields['socioeconomic_benefits'].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. Please include other \ + reasons, noting that we aim to focus on projects with substantive impacts on \ + vulnerable groups.') + \ + '' + \ + '' + \ + _('Please expand on your response given in the description. Note that we aim to \ + focus on violation of land rights / human rights / collective rights, substantive \ + negative impacts on vulnerable groups, aggression / threats / violence, \ + severe environmental and/or cultural impacts, abusive labor practices, and \ + corruption / governance issues, but feel free to cover any additional aspect \ + that you consider relevant. Please also describe and analyze socio-environmental \ + impacts that could be presented or considered as positive.') + \ + '' + \ + '' + \ + _('Please expand on your response given in the description. Please also describe \ + and analyze socio-environmental impacts that could be considered as negative.') + \ + '' + self.helper.form_action = reverse('long-form') self.helper.layout = Layout( TabHolder( @@ -234,15 +280,21 @@ class LongCaseStudyForm(BaseCaseStudyForm): 'entry_name', 'location', 'country', + 'shapefiles', + 'shapefiles_files', + 'coordinate_reference_system', + 'name_of_territory_or_area', 'area_of_land', 'land_ownership', 'land_ownership_details', 'location_context', 'type_of_ecosystem', 'describe_ecosystem', - 'people_affected_indigenous', + 'affected_communities', 'people_affected_other', 'project_status', + 'start_year', + 'completion_year', 'synopsis', 'full_description', 'images', @@ -253,10 +305,10 @@ class LongCaseStudyForm(BaseCaseStudyForm): Fieldset( _("Ownership and finance"), 'project_owners', + 'consultants_contractors', 'shareholders', 'financial_institutions', 'financial_institutions_other', - 'energy_customers' ), Fieldset( _("Media reports and other communications"), @@ -273,31 +325,41 @@ class LongCaseStudyForm(BaseCaseStudyForm): Tab( _("Technical and economic analysis"), 'sector_of_economy', - Fieldset( - _("Power Generation Questions"), + Div( + 'generation_type', 'generation_technology', - 'biomass_detail', - 'generation_technology_other', - 'total_generation_capacity', - 'generation_equipment_supplier', - 'total_investment', - 'technical_or_economic_details', - css_id="power_generation_questions" + css_class='power_generation_questions' ), - Fieldset( - _("Power Grids/Energy Storage Questions"), + Div( 'power_technology', - 'power_technology_other', - 'energy_storage_capacity', - 'maximum_power_output', - 'discharge_time', - 'contractor_or_supplier_of_technology', - 'approximate_total_investment', - 'additional_technical_details', - css_id="power_grids_energy_storage_questions" + css_class='energy_network_questions' ), - Fieldset( - _("Mineral/Commodity Questions"), + Div( + 'energy_details', + css_class='energy_generation_network_and_storage_questions' + ), + Div( + 'biomass_detail', + 'total_generation_capacity', + css_class='power_generation_questions' + ), + Div( + 'energy_transmission_capacity', + css_class='energy_network_questions' + ), + Div( + 'energy_storage_capacity', + css_class='energy_storage_questions' + ), + Div( + PrependedText('total_investment', 'USD $'), + 'contractor_or_supplier_of_technology', + 'energy_customers', + 'additional_technical_details', + css_class='energy_generation_network_and_storage_questions' + ), + + Div( 'minerals_or_commodities', 'minerals_or_commodities_other', 'use_in_energy_economy', @@ -307,7 +369,16 @@ class LongCaseStudyForm(BaseCaseStudyForm): 'projected_production_of_commodities', 'type_of_extraction', 'associated_infrastructure', - css_id="mineral_commodity_questions" + css_class="mineral_commodity_questions" + ), + Div( + 'manufacturing_type', + 'manufacturing_description', + 'manufacturing_related_tech', + 'manufacturing_factors', + 'manufacturing_factors_description', + 'manufacturing_ownership', + css_class="manufacturing_questions" ), FormActions( HTML(""+_("Previous")+""), @@ -316,32 +387,31 @@ class LongCaseStudyForm(BaseCaseStudyForm): ), Tab( _("Socio-environmental analysis"), + HTML("

" + _("In the following, we expect the analysis to reflect the perspective of the organization(s) or person(s) describing the case.") + "

"), 'positive_or_negative', - Fieldset( - _("Positive Case Questions"), - 'positive_case_type', - 'socioeconomic_benefits', - 'project_status_detail', - 'obstacles_and_hindrances', - 'identified_partnerships', - css_id="positive_case_questions" - ), - Fieldset( - _("Negative Case Questions"), - 'negative_case_reasons', - 'negative_case_reasons_other', - 'negative_socioenvironmental_impacts', - 'isolated_or_widespread', - 'when_did_organising_start', - 'who_has_been_involved', - 'participation_mechanisms', - 'potential_partnerships', - 'wants_conversation_with_ojuso', - css_id="negative_case_questions" - ), Div( - 'key_actors_involved', - css_id="common_questions" + HTML(""), + Div( + 'positive_case_type', + 'negative_case_reasons', + css_class='col-md-9', + ), + css_class='form-group', + ), + 'negative_case_reasons_other', + 'socioeconomic_benefits', + 'isolated_or_widespread', + 'key_actors_involved', + 'project_status_detail', + 'obstacles_and_hindrances', + 'negative_socioenvironmental_impacts', + 'when_did_organising_start', + 'who_has_been_involved', + 'participation_mechanisms', + 'identified_partnerships', + 'wants_conversation_with_ojuso', + Div( + css_class="common_questions" ), FormActions( HTML(""+_("Previous")+""), @@ -356,6 +426,8 @@ class LongCaseStudyForm(BaseCaseStudyForm): PrependedText('contact_twitter', '@', placeholder='username'), 'contact_facebook', 'contact_other', + 'shown_on_other_platforms', + 'shown_on_other_platforms_detail', FormActions( HTML(""+_("Previous")+""), HTML(""+_("Next")+"") @@ -367,12 +439,6 @@ class LongCaseStudyForm(BaseCaseStudyForm): 'official_project_documents_files', 'other_documents', 'other_documents_files', - 'shapefiles', - 'shapefiles_files', - 'coordinate_reference_system', - 'name_of_territory_or_area', - 'shown_on_other_platforms', - 'shown_on_other_platforms_detail', FormActions( HTML(""+_("Previous")+""), Submit('submit', _('Submit'), css_class="btn-success pull-right") diff --git a/apps/map/migrations/0072_auto_20181201_2315.py b/apps/map/migrations/0072_auto_20181201_2315.py new file mode 100644 index 0000000..5ea22bd --- /dev/null +++ b/apps/map/migrations/0072_auto_20181201_2315.py @@ -0,0 +1,309 @@ +# Generated by Django 2.1.1 on 2018-12-01 23:15 + +from django.db import migrations, models +import django.db.models.deletion +import django_extensions.db.fields +import multiselectfield.db.fields + + +class Migration(migrations.Migration): + + dependencies = [ + ('map', '0071_point_of_interest'), + ] + + operations = [ + migrations.AlterModelOptions( + name='pointofinterest', + options={'verbose_name_plural': 'points of interest'}, + ), + migrations.RemoveField( + model_name='casestudy', + name='generation_technology_other', + ), + migrations.AddField( + model_name='casestudy', + name='affected_communities', + field=multiselectfield.db.fields.MultiSelectField(blank=True, choices=[('INDIG', 'Indigenous'), ('AFRO', 'Afro-descendants'), ('MIG', 'Migrants'), ('REF', 'Refugees'), ('OTHER', 'Other communities or identities')], max_length=50, verbose_name='Communities or identities present in the project area'), + ), + migrations.AddField( + model_name='casestudy', + name='consultants_contractors', + field=models.TextField(blank=True, help_text='List consultants, planners or organisations that are doing the planning, construction, operation or maintenance work relating to the project and/or facilities. Separate each with a new line.', verbose_name='Consultants and contractors'), + ), + migrations.AddField( + model_name='casestudy', + name='energy_details', + field=models.CharField(blank=True, help_text='Please give more information about the transmission, network or storage technology.', max_length=200, verbose_name='Further details'), + ), + migrations.AddField( + model_name='casestudy', + name='energy_transmission_capacity', + field=models.DecimalField(blank=True, decimal_places=3, max_digits=20, null=True, verbose_name='Total transmission capacity (kW)'), + ), + migrations.AddField( + model_name='casestudy', + name='generation_type', + field=models.CharField(blank=True, choices=[('POW', 'Power'), ('HOT', 'Heat/Cool'), ('CHP', 'Combined Heat/Cool and Power (CHP)')], max_length=4, verbose_name='What is being generated?'), + ), + migrations.AddField( + model_name='casestudy', + name='manufacturing_description', + field=models.TextField(blank=True, help_text='Briefly describe manufacturing process and components/outputs. (less than 500 characters, about 2 tweets).', max_length=500, verbose_name='Description'), + ), + migrations.AddField( + model_name='casestudy', + name='manufacturing_factors', + field=multiselectfield.db.fields.MultiSelectField(blank=True, choices=[('LAND', 'Land use'), ('LABOR', 'Labor rights'), ('ENVIRO', 'Environmental factors'), ('LIFECYCLE', 'Lifecycle management'), ('OWN', 'Ownership'), ('OTHER', 'Other(s)')], max_length=128, verbose_name='Choose the factors that make this case remarkable, in a positive or negative way'), + ), + migrations.AddField( + model_name='casestudy', + name='manufacturing_factors_description', + field=models.TextField(blank=True, verbose_name='Describe these factors'), + ), + migrations.AddField( + model_name='casestudy', + name='manufacturing_ownership', + field=models.TextField(blank=True, verbose_name='Describe the ownership structure of the project and its relation with the local community'), + ), + migrations.AddField( + model_name='casestudy', + name='manufacturing_related_tech', + field=multiselectfield.db.fields.MultiSelectField(blank=True, choices=[('PV', 'Solar PV'), ('CSP', 'CSP'), ('WIND', 'Wind power'), ('HYDRO', 'Hydropower'), ('GEO', 'Geothermal'), ('TRANSMIT', 'Electrical power transmission infrastructure'), ('STORE', 'Energy storage'), ('HEAT', 'Heat networks'), ('OTHER', 'Other'), ('IDK', 'Unknown')], max_length=128, verbose_name='What technology is this case related to?'), + ), + migrations.AddField( + model_name='casestudy', + name='manufacturing_type', + field=models.CharField(blank=True, choices=[('GENERATE', 'Manufacturing of renewable energy generation equipment'), ('TRANSSTORE', 'Manufacturing of energy transmission or storage equipment'), ('RECYCLE', 'Recycling / reusing equipment or raw materials'), ('DISPOSAL', 'Disposal of equipment'), ('OTHER', 'Other')], max_length=16, verbose_name='Which of the following options best describes this case?'), + ), + migrations.AlterField( + model_name='casestudy', + name='additional_technical_details', + field=models.TextField(blank=True, help_text='Add any additional details such as: length, from-to, voltage, substations, power output, (dis)charge rates, how this technology or project interacts with the energy system (e.g. provides reactive power to ensure power supply in phase etc.)', verbose_name='Additional technical or economic details'), + ), + migrations.AlterField( + model_name='casestudy', + name='biomass_detail', + field=models.CharField(blank=True, help_text="

Please describe the source of the fuel and how it is processed/used. Please consider:

We do not expect users to know this information, but if you do it may be useful to give a fuller picture.

", max_length=200, verbose_name='Bio-energy feedstock'), + ), + migrations.AlterField( + model_name='casestudy', + name='completion_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)], default=None, help_text="Select the year the project's operation and maintenance (O&M) phase began. If the project is not yet in operation, select the year operation is expected to begin as detailed in company information or media.", null=True, verbose_name='Operation start year'), + ), + migrations.AlterField( + model_name='casestudy', + name='contractor_or_supplier_of_technology', + field=models.TextField(blank=True, help_text='List companies that act as contractors or suppliers –\xa0e.g. Siemens Gamesa, GE, Alstom, Vestas, Hanwha Q CELLS, Mitsubishi, First Solar, Jinko Solar, Trina Solar, Suzlon Energy, Statkraft, Shanghai Electric, Ballard Power Systems, Panasonic, etc', verbose_name='Contractor and/or supplier of technology'), + ), + migrations.AlterField( + model_name='casestudy', + name='coordinate_reference_system', + field=models.ForeignKey(blank=True, default=4326, null=True, on_delete=django.db.models.deletion.PROTECT, to='map.SpatialRefSys'), + ), + migrations.AlterField( + model_name='casestudy', + name='describe_ecosystem', + field=models.TextField(verbose_name='Describe the ecosystem'), + ), + 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. If you have files to upload, you can do this in 'other documents' on the 'uploads' tab.", verbose_name='Reports of direct communications'), + ), + migrations.AlterField( + model_name='casestudy', + name='energy_customers', + field=models.TextField(blank=True, help_text="List any energy customers/off-takers that take energy from the development. E.g. 'national grids' or private energy suppliers. Also refer to if carbon markets, credits, blockchain etc. are involved in the process. Please separate with a new line.", verbose_name='Energy service consumers/off-takers'), + ), + migrations.AlterField( + model_name='casestudy', + name='energy_storage_capacity', + field=models.DecimalField(blank=True, decimal_places=3, max_digits=20, null=True, verbose_name='Total storage capacity (kWh)'), + ), + migrations.AlterField( + model_name='casestudy', + name='entry_name', + field=models.CharField(help_text='This should usually be the name of the project. If you are writing this case study in a language not used in the locale of its project, you should provide its local name first, as well as any translated name.', max_length=128, verbose_name='Entry Name'), + ), + migrations.AlterField( + model_name='casestudy', + name='financial_institutions', + field=multiselectfield.db.fields.MultiSelectField(blank=True, choices=[('AfDB', 'African Development Bank (AfDB)'), ('BADEA', 'Arab Bank for Economic Development in Africa (BADEA)'), ('ADB', 'Asian Development Bank (ADB)'), ('AIIB', 'Asian Infrastructure Investment Bank (AIIB)'), ('BSTDB', 'Black Sea Trade and Development Bank (BSTDB)'), ('CAF', 'Corporacion Andina de Fomento / Development Bank of Latin America (CAF)'), ('CDB', 'Caribbean Development Bank (CDB)'), ('CABEI', 'Central American Bank for Economic Integration (CABEI)'), ('EADB', 'East African Development Bank (EADB)'), ('ETDB', 'Economic Cooperation Organization Trade and Development Bank (ETDB)'), ('EDB', 'Eurasian Development Bank (EDB)'), ('EBRD', 'European Bank for Reconstruction and Development (EBRD)'), ('EC', 'European Commission (EC)'), ('EIB', 'European Investment Bank (EIB)'), ('IADB', 'Inter-American Development Bank Group (IDB, IADB)'), ('IFFIm', 'International Finance Facility for Immunisation (IFFIm)'), ('IFAD', 'International Fund for Agricultural Development (IFAD)'), ('IIB', 'International Investment Bank (IIB)'), ('IsDB', 'Islamic Development Bank (IsDB)'), ('FMO', 'Nederlandse Financieringsmaatschappij voor Ontwikkelingslanden NV (FMO)'), ('NDB', 'New Development Bank (NDB) (formerly BRICS Development Bank)'), ('NDF', 'The Nordic Development Fund'), ('NIB', 'Nordic Investment Bank (NIB)'), ('OFID', 'OPEC Fund for International Development (OFID)'), ('BOAD', 'West African Development Bank (BOAD)'), ('WB', 'World Bank')], help_text='Select any financial institutions (public or private) that have, or are considering, extending loans or guarantees to the project.', max_length=119, verbose_name='Financial institutions'), + ), + migrations.AlterField( + model_name='casestudy', + name='full_description', + field=models.TextField(help_text='Describe the project in full. Separate paragraphs with two new lines. 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 Gamesa, GE, Alstom, Vestas, Hanwha Q CELLS, Mitsubishi, First Solar, Jinko Solar, Trina Solar, Suzlon Energy, Statkraft, Shanghai Electric, Ballard Power Systems, Panasonic, etc.)', verbose_name='Generation equipment supplier(s)'), + ), + migrations.AlterField( + model_name='casestudy', + name='generation_technology', + field=models.CharField(blank=True, choices=[('BIO', 'Bio-energy'), ('GEOT', 'Geothermal electricity'), ('Hydro', (('uHYD', 'Micro hydro (<100kW)'), ('SHYD', 'Small-scale hydro (<1MW)'), ('MHYD', 'Medium-scale hydro (1-30MW)'), ('LHYD', 'Large-scale hydro (>30MW - often not considered renewable)'))), ('Marine', (('WAVE', 'Wave'), ('TSTR', 'Tidal stream'), ('TBAR', 'Tidal barrage/lagoon'), ('TOTH', 'Other'))), ('Solar', (('SSPV', 'Small-scale photovoltaic (<500kW)'), ('LSPV', 'Large-scale photovoltaic (>500kW)'), ('CSP', 'Concentrated solar power (CSP)'), ('PARA', 'Parabolic trough (open or enclosed)'), ('FRES', 'Fresnel reflector'), ('STIR', 'Dish Stirling'))), ('Wind', (('SSWE', 'Small-scale wind (<500kW)'), ('LSWE', 'Large-scale wind (>500kW)'))), ('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='identified_partnerships', + field=models.CharField(blank=True, help_text='Are you, or the organizing process that you represent, looking for partnerships, or have any clearly identified need? If so, please describe and we will try to connect you to appropriate partners.', 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 so, can you describe them? Is there an analysis of cumulative or synergetic effects?', verbose_name='Is the project part of developments which are causing a cumulative effect?'), + ), + migrations.AlterField( + model_name='casestudy', + name='land_ownership', + field=models.CharField(choices=[('PRI', 'Private land'), ('PUB', 'Public/state land'), ('COM', 'Community/communal/customary land'), ('CON', 'Contested/in conflict'), ('OTH', 'Other')], help_text='What type of ownership does the land fall under?', max_length=3, verbose_name='Land ownership / tenure'), + ), + migrations.AlterField( + model_name='casestudy', + name='land_ownership_details', + field=models.TextField(blank=True, help_text="

Please specify details about land ownership, including conflicting claims, unrecognized customary rights, conflicts around land lease or purchase contracts, etc.

We understand this is a difficult question, so please try to provide just the information you know. If we have any major questions we will ask them in the moderation process.

", max_length=256, verbose_name='Land ownership details'), + ), + migrations.AlterField( + model_name='casestudy', + name='location_context', + field=models.CharField(choices=[('RUR', 'Rural'), ('URB', 'Urban'), ('MIX', 'Mixed')], help_text='Select the context that is most applicable to this case study.', max_length=3, verbose_name='Location'), + ), + 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='What mineral commodity is primarily mined in this project?', max_length=3, verbose_name='Primary mineral mined'), + ), + migrations.AlterField( + model_name='casestudy', + name='minerals_or_commodities_other', + field=models.TextField(blank=True, help_text='Enter any mineral commodities not in the list. Separate each with a new line.', verbose_name='Other mineral commodities'), + ), + 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')], max_length=34, verbose_name='What kind of case is this entry about?'), + ), + migrations.AlterField( + model_name='casestudy', + name='negative_socioenvironmental_impacts', + field=models.TextField(blank=True, help_text='Provide a detailed description of the socio-environmental impacts (please provide all relevant details, such as type of ecosystem and presence of any existing reserve in the area, land to have increased biodiversity as a result of the project, new protection of lands/waters, 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 socio-environmental impacts (positive and negative):'), + ), + migrations.AlterField( + model_name='casestudy', + name='obstacles_and_hindrances', + field=models.TextField(blank=True, help_text='Please describe the status of the organizing process, including the obstacles and hindrances faced.', max_length=512, verbose_name='Current status of the organizing process around this case'), + ), + migrations.AlterField( + model_name='casestudy', + name='official_project_documents', + field=models.ManyToManyField(blank=True, help_text='Attach any legal or official documents that relate to the project. Hold down Control, or Command on a Mac, to select more than one.', related_name='official_project_document_for', to='files.File', verbose_name='Official project documents'), + ), + migrations.AlterField( + model_name='casestudy', + name='other_documents', + field=models.ManyToManyField(blank=True, help_text='Attach any other documents that relate to the project. Hold down Control, or Command on a Mac, to select more than one.', related_name='other_document_for', to='files.File', verbose_name='Other documents'), + ), + migrations.AlterField( + model_name='casestudy', + name='people_affected_other', + field=models.TextField(blank=True, help_text='Please describe further the communities or identities present in the project area.', verbose_name='Communities or identities – further detail'), + ), + migrations.AlterField( + model_name='casestudy', + name='positive_case_type', + field=multiselectfield.db.fields.MultiSelectField(blank=True, choices=[('CREP', 'Community project (co-)owned by individuals'), ('EACP', 'Community project owned by not-for-profit organizations and/or serving the public interest'), ('PSEP', 'Public/state (federal, state, municipal) project'), ('CORS', 'Reuse / Recycling / Circular economy project')], max_length=32, verbose_name='What kind of case is this entry about?'), + ), + migrations.AlterField( + model_name='casestudy', + name='positive_or_negative', + field=models.CharField(choices=[('P', 'There is/was an organising process in favour of the project'), ('N', 'There is/was an organising process against the project'), ('X', 'There is/was no organising process'), ('U', 'Unsure/unknown')], max_length=1, verbose_name='What is the relationship of local community organization(s) to this project?'), + ), + migrations.AlterField( + model_name='casestudy', + name='power_technology', + field=models.CharField(blank=True, choices=[('PT', 'Electrical power transmission'), ('HN', 'Heat networks'), ('OT', 'Other')], max_length=2, verbose_name='Power technology'), + ), + migrations.AlterField( + model_name='casestudy', + name='power_technology_other', + field=models.CharField(blank=True, max_length=128, verbose_name='Further information about power technology'), + ), + migrations.AlterField( + model_name='casestudy', + name='project_owners', + field=models.TextField(blank=True, help_text='List companies or organisations that own the project and/or facilities. Provide company numbers etc. if available. Separate with a new line.', verbose_name='Project and facility owners'), + ), + migrations.AlterField( + model_name='casestudy', + name='project_status', + field=models.CharField(choices=[('INIT', 'Initiation/ideation'), ('PROJCD', 'In planning and design'), ('FAIL', 'Failed'), ('UCONST', 'Under construction'), ('EXSTNG', 'In operation'), ('DECOMM', 'Undergoing decommissioning'), ('END', 'Decommissioned')], 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 situation and likely future scenarios.', verbose_name='Current status of the case'), + ), + 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.
For example, "40 million tonnes of iron ore per year", "200 million tonnes over 5 year life of mine"', max_length=256, verbose_name='Estimated production of key commodities'), + ), + migrations.AlterField( + model_name='casestudy', + name='sector_of_economy', + field=models.CharField(choices=[('RN', 'Renewable energy generation project'), ('PG', 'Energy networks'), ('ST', 'Energy storage facilities'), ('SM', 'Mining related to the renewable energy economy'), ('MA', 'Manufacturing and/or processing of equipment')], max_length=3, verbose_name='Sector of economy'), + ), + migrations.AlterField( + model_name='casestudy', + name='shapefiles', + field=models.ManyToManyField(blank=True, help_text='If you have territory that you would like to show in relation to this project - e.g. Bienes Comunales de Ixtepec etc. This is a set of 3 or more (often 5-6) files with file extensions like .cpg, .dbf, .prj, .qpj, .shp, .shx. Hold down Control, or Command on a Mac, to select more than one. Let us know (database@ojuso.org) if you have other file types or need help and we can work out how to import it. You may have data as GeoPackage (gpkg), GeoJSON, KML, GML, etc. or have data in PostGIS or another spatial database management system already.', related_name='shapefile_for', to='files.File', verbose_name='Geographic data'), + ), + 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 of 2,300 hectares')", max_length=200, verbose_name='Size of concessions (land/marine area)'), + ), + migrations.AlterField( + model_name='casestudy', + name='socioeconomic_benefits', + field=models.TextField(blank=True, verbose_name='Socio-economic impacts'), + ), + 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 project construction began. If the project is not yet in construction, select the assumed start year as detailed in company information or media.', null=True, verbose_name='Construction start year'), + ), + migrations.AlterField( + model_name='casestudy', + name='total_investment', + field=models.IntegerField(blank=True, help_text='The approximate total investment for the project in US dollars.', 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')], max_length=56, verbose_name='Type(s) of ecosystem'), + ), + migrations.AlterField( + model_name='casestudy', + name='use_in_energy_economy', + field=multiselectfield.db.fields.MultiSelectField(blank=True, choices=[('CPV', 'Concentrated solar power (CSP)'), ('EPT', 'Electrical power transmission infrastructure'), ('ESS', 'Energy storage'), ('GGM', 'Geothermal'), ('HGM', 'Hydropower'), ('HNT', 'Heat networks'), ('SPM', 'Solar PV'), ('STM', 'Solar thermal systems'), ('WTM', 'Wind power'), ('ESS', "Don't know"), ('OTR', 'Other')], max_length=128, 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'), + ), + 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='pointofinterest', + name='slug', + field=django_extensions.db.fields.AutoSlugField(blank=True, editable=False, populate_from=['title']), + ), + ] diff --git a/apps/map/models.py b/apps/map/models.py index 7a56e12..90c33d4 100644 --- a/apps/map/models.py +++ b/apps/map/models.py @@ -53,21 +53,18 @@ class CaseStudy(models.Model): approved = models.BooleanField(default=False) # Choice lists for drop-downs - SECTOR_CHOICES = ( - ('RN', _('Renewable Energy Generation')), - ('PG', _('Power Grids')), - ('SM', _('Supply of Minerals')), - ) - POSITIVE_NEGATIVE_CHOICES = ( - ('P', _('Positive')), - ('N', _('Negative')) + ('P', _('There is/was an organising process in favour of the project')), + ('N', _('There is/was an organising process against the project')), + ('X', _('There is/was no organising process')), + ('U', _('Unsure/unknown')) ) LAND_OWNERSHIP_CHOICES = ( - ('PRI', _('Private Land')), - ('PUB', _('Public Land')), - ('COM', _('Community Land')), + ('PRI', _('Private land')), + ('PUB', _('Public/state land')), + ('COM', _('Community/communal/customary land')), + ('CON', _('Contested/in conflict')), ('OTH', _('Other')), ) @@ -88,10 +85,22 @@ class CaseStudy(models.Model): ('URBAN', _('Urban')) ) + AFFECTED_COMMUNITIES_CHOICES = ( + ('INDIG', _('Indigenous')), + ('AFRO', _('Afro-descendants')), + ('MIG', _('Migrants')), + ('REF', _('Refugees')), + ('OTHER', _('Other communities or identities')), + ) + PROJECT_STATUS_CHOICES = ( - ('EXSTNG', _('Existing Project')), - ('UCONST', _('Under Construction')), - ('PROJCD', _('Projected Project')), + ('INIT', _('Initiation/ideation')), + ('PROJCD', _('In planning and design')), + ('FAIL', _('Failed')), + ('UCONST', _('Under construction')), + ('EXSTNG', _('In operation')), + ('DECOMM', _('Undergoing decommissioning')), + ('END', _('Decommissioned')), ) FINANCIAL_INSTITUTIONS = ( @@ -123,31 +132,54 @@ class CaseStudy(models.Model): ('WB', _('World Bank')), ) + SECTOR_CHOICES = ( + ('RN', _('Renewable energy generation project')), + ('PG', _('Energy networks')), + ('ST', _('Energy storage facilities')), + ('SM', _('Mining related to the renewable energy economy')), + ('MA', _('Manufacturing and/or processing of equipment')) + ) + + GENERATION_TYPE_CHOICES = ( + ('POW', _('Power')), + ('HOT', _('Heat/Cool')), + ('CHP', _('Combined Heat/Cool and Power (CHP)')), + ) + GENERATION_TECHNOLOGY_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)')), + ('BIO', _('Bio-energy')), ('GEOT', _('Geothermal electricity')), - ('BIOG', _('Biogas turbine')), - ('OTHB', _('Other biomass (including liquid/solid biofuel)')), + (_('Hydro'), ( + ('uHYD', _('Micro hydro (<100kW)')), + ('SHYD', _('Small-scale hydro (<1MW)')), + ('MHYD', _('Medium-scale hydro (1-30MW)')), + ('LHYD', _('Large-scale hydro (>30MW - often not considered renewable)')), + )), + (_('Marine'), ( + ('WAVE', _('Wave')), + ('TSTR', _('Tidal stream')), + ('TBAR', _('Tidal barrage/lagoon')), + ('TOTH', _('Other')), + )), + (_('Solar'), ( + ('SSPV', _('Small-scale photovoltaic (<500kW)')), + ('LSPV', _('Large-scale photovoltaic (>500kW)')), + ( 'CSP', _('Concentrated solar power (CSP)')), + ('PARA', _('Parabolic trough (open or enclosed)')), + ('FRES', _('Fresnel reflector')), + ('STIR', _('Dish Stirling')), + )), + (_('Wind'), ( + ('SSWE', _('Small-scale wind (<500kW)')), + ('LSWE', _('Large-scale wind (>500kW)')) + )), ('OTHR', _('Other (tidal, wave etc)')) ) POWER_TECHNOLOGY_CHOICES = ( - ('PT', _('Power transmission (grid lines, substations etc)')), - ('ES', _('Energy storage (pumped storage, compressed air, battery systems etc')), - ('OT', _('Others')) + ('PT', _('Electrical power transmission')), + ('HN', _('Heat networks')), + ('OT', _('Other')), ) TYPE_OF_EXTRACTION_CHOICES = ( @@ -195,24 +227,56 @@ class CaseStudy(models.Model): ) USE_IN_ENERGY_ECONOMY_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')) + ('CPV', _('Concentrated solar power (CSP)')), + ('EPT', _('Electrical power transmission infrastructure')), + ('ESS', _('Energy storage')), + ('GGM', _('Geothermal')), + ('HGM', _('Hydropower')), + ('HNT', _('Heat networks')), + ('SPM', _('Solar PV')), + ('STM', _('Solar thermal systems')), + ('WTM', _('Wind power')), + ('ESS', _("Don't know")), + ('OTR', _('Other')) + ) + + MANUFACTURING_TYPE_CHOICES = ( + ('GENERATE', _('Manufacturing of renewable energy generation equipment')), + ('TRANSSTORE', _('Manufacturing of energy transmission or storage equipment')), + ('RECYCLE', _('Recycling / reusing equipment or raw materials')), + ('DISPOSAL', _('Disposal of equipment')), + ('OTHER', _('Other')), + ) + + MANUFACTURING_RELATED_CHOICES = ( + ('PV', _('Solar PV')), + ('CSP', _('CSP')), + ('WIND', _('Wind power')), + ('HYDRO', _('Hydropower')), + ('GEO', _('Geothermal')), + ('TRANSMIT', _('Electrical power transmission infrastructure')), + ('STORE', _('Energy storage')), + ('HEAT', _('Heat networks')), + ('OTHER', _('Other')), + ('IDK', _('Unknown')), + ) + + MANUFACTURING_FACTORS_CHOICES = ( + ('LAND', _('Land use')), + ('LABOR', _('Labor rights')), + ('ENVIRO', _('Environmental factors')), + ('LIFECYCLE', _('Lifecycle management')), + ('OWN', _('Ownership')), + ('OTHER', _('Other(s)')), ) POSITIVE_CASE_TYPE_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')), + ('CREP', _('Community project (co-)owned by individuals')), + ('EACP', _('Community project owned by not-for-profit organizations and/or serving the public interest')), + ('PSEP', _('Public/state (federal, state, municipal) project')), + ('CORS', _('Reuse / Recycling / Circular economy project')), ) - NEGATIVE_CASE_REASONS_OTHER_TEXT = _('Other reasons') - NEGATIVE_CASE_REASONS_CHOICES = ( ('VOLR', _('Violation of land rights')), ('VOHR', _('Violation of fundamental human rights, indigenous rights and/or other collective rights')), @@ -224,14 +288,6 @@ class CaseStudy(models.Model): etc')), ('ALAB', _('Abusive labour practices')), ('CRUP', _('Corruption and/or irregular permitting or contracting, conflicts of interest etc')), - # - # N.B. - # If you add another field in here, you need to edit conditionalCheckboxes - # in templates/map/form.html and increment the check for the 'other' field there. - # If you don't, the 'other' detail entry won't show and hide at the appropriate - # times. - # - ('OTHR', NEGATIVE_CASE_REASONS_OTHER_TEXT) ) # Dynamically generate a list of choices 40 years prior and after the current year. @@ -258,6 +314,45 @@ class CaseStudy(models.Model): # Slug derived from entry_name, used in urls for SEO slug = AutoSlugField(populate_from=['entry_name'], editable=False) + ## + # Territory info + ## + + location = models.PointField( + verbose_name=_("Project location") + ) + + shapefiles = models.ManyToManyField( + 'files.File', + related_name='shapefile_for', + verbose_name=_("Geographic data"), + help_text=_("If you have territory that you would like to show in relation to this project \ + - e.g. Bienes Comunales de Ixtepec etc. This is a set of 3 or more (often 5-6) \ + files with file extensions like .cpg, .dbf, .prj, .qpj, .shp, .shx. \ + \ + Hold down Control, or Command on a Mac, to select more than one. \ + Let us know (database@ojuso.org) if you have other file types or need help and we \ + can work out how to import it. You may have data as GeoPackage (gpkg), GeoJSON, \ + KML, GML, etc. or have data in PostGIS or another spatial database management \ + system already."), + blank=True + ) + + coordinate_reference_system = models.ForeignKey( + SpatialRefSys, + null=True, + blank=True, + default=4326, + on_delete=models.PROTECT + ) + + name_of_territory_or_area = models.CharField( + verbose_name=_("Name of territory or area"), + max_length=512, + blank=True + ) + + ## # First Screen - Basic information ## @@ -265,33 +360,13 @@ class CaseStudy(models.Model): # 1.1 entry_name = models.CharField( verbose_name=_("Entry Name"), - help_text=_("Enter the name of the entry. This should usually be the\ - name of project."), + help_text=_("This should usually be the name of the project. \ + If you are writing this case study in a language not used \ + in the locale of its project, you should provide its local name \ + first, as well as any translated name."), max_length=128 ) - # N/A - Not explicitly listed in spec - location = models.PointField( - verbose_name=_("Project location") - ) - - # 1.2 - sector_of_economy = models.CharField( - verbose_name=_("Sector of economy"), - help_text=_("Which sector of the renewable energy economy is most\ - relevant?"), - max_length=3, - choices=SECTOR_CHOICES - ) - - # 1.3 - positive_or_negative = models.CharField( - verbose_name=_("Positive or negative?"), - help_text=_("Is the case study a positive case or a negative case?"), - max_length=1, - choices=POSITIVE_NEGATIVE_CHOICES - ) - # 1.4 country = CountryField( verbose_name=_("Country"), @@ -306,16 +381,22 @@ class CaseStudy(models.Model): # 1.5.2 land_ownership = models.CharField( - verbose_name=_("Land ownership"), + verbose_name=_("Land ownership / tenure"), help_text=_("What type of ownership does the land fall under?"), max_length=3, choices=LAND_OWNERSHIP_CHOICES ) # 1.5.3 - land_ownership_details = models.CharField( + land_ownership_details = models.TextField( verbose_name=_("Land ownership details"), - help_text=_("Please specify details about land ownership"), + help_text=_("

Please specify details about land ownership, including \ + conflicting claims, unrecognized customary rights, conflicts \ + around land lease or purchase contracts, etc.\ + \ +

We understand this is a difficult question, so \ + please try to provide just the information you know. \ + If we have any major questions we will ask them in the moderation process.

"), max_length=256, blank=True, ) @@ -323,8 +404,7 @@ class CaseStudy(models.Model): # 1.5.4 location_context = models.CharField( verbose_name=_("Location"), - help_text=_("Select the context that is most applicable to this case\ - study."), + help_text=_("Select the context that is most applicable to this case study."), max_length=3, choices=LOCATION_CONTEXT_CHOICES ) @@ -332,7 +412,6 @@ class CaseStudy(models.Model): # 1.5.5 type_of_ecosystem = MultiSelectField( verbose_name=_("Type(s) of ecosystem"), - help_text=_("Select the most relevant type(s)."), max_length=56, choices=TYPE_OF_ECOSYSTEM_CHOICES, blank=True @@ -341,10 +420,16 @@ class CaseStudy(models.Model): # 1.5.5.3 describe_ecosystem = models.TextField( verbose_name=_("Describe the ecosystem"), - help_text=_("In your own words, add more detail about the ecosystem."), ) - # Was 1.5.6; spec not being followed here after request from client + affected_communities = MultiSelectField( + verbose_name=_("Communities or identities present in the project area"), + max_length=50, + choices=AFFECTED_COMMUNITIES_CHOICES, + blank=True + ) + + # XXX Delete after migration - merge into affected_communities people_affected_indigenous = models.TextField( verbose_name=_("Indigenous people affected"), help_text=_("What group or groups of indigenous people are affected by this project? \ @@ -353,25 +438,25 @@ class CaseStudy(models.Model): ) people_affected_other = models.TextField( - verbose_name=_("Non-indigenous people affected"), - help_text=_("What other group or groups of people are affected by this project? \ - Please separate by newline."), + verbose_name=_("Communities or identities – further detail"), + help_text=_("Please describe further the communities or identities present \ + in the project area."), blank=True ) # 1.6 project_status = models.CharField( - verbose_name=_("Status of Project"), - help_text=_("What is the status of the current project?"), + verbose_name=_("Status of project"), max_length=6, choices=PROJECT_STATUS_CHOICES ) # 1.7 start_year = models.IntegerField( - verbose_name=_("Start year"), - help_text=_("Select the year the project was started. \ - If the project hasn't begun, select the projected start year."), + verbose_name=_("Construction start year"), + help_text=_("Select the year project construction began. If the project is not yet \ + in construction, select the assumed start year as detailed in company \ + information or media."), choices=YEAR_CHOICES, blank=True, null=True @@ -379,9 +464,10 @@ class CaseStudy(models.Model): # 1.8 completion_year = models.IntegerField( - verbose_name=_("Completion year"), - help_text=_("Select the year the project was completed. \ - If the project hasn't finished, select the projected completion year."), + verbose_name=_("Operation start year"), + help_text=_("Select the year the project's operation and maintenance (O&M) phase began. \ + If the project is not yet in operation, select the year operation is expected \ + to begin as detailed in company information or media."), choices=YEAR_CHOICES, default=None, null=True, @@ -399,15 +485,24 @@ class CaseStudy(models.Model): # 1.10 full_description = models.TextField( verbose_name=_("Full Description"), - help_text=_("Describe the project in full. Separate paragraphs with a\ - new line Please add as much detail as you feel is necessary\ + help_text=_("Describe the project in full. Separate paragraphs with two\ + new lines. Please add as much detail as you feel is necessary\ here.") ) # 1.11 project_owners = models.TextField( verbose_name=_("Project and facility owners"), - help_text=_("List companies or organisations that own the project and/or facilities. Separate with a new line."), + help_text=_("List companies or organisations that own the project and/or facilities. \ + Provide company numbers etc. if available. Separate with a new line."), + blank=True + ) + + consultants_contractors = models.TextField( + verbose_name=_("Consultants and contractors"), + help_text=_("List consultants, planners or organisations that are doing the planning, \ + construction, operation or maintenance work relating to the project \ + and/or facilities. Separate each with a new line."), blank=True ) @@ -421,8 +516,8 @@ class CaseStudy(models.Model): # 1.13.1 financial_institutions = MultiSelectField( verbose_name=_("Financial institutions"), - help_text=_("Select any financial institutions that have or are considering extending \ - loans or guarantees to the project."), + help_text=_("Select any financial institutions (public or private) that have, \ + or are considering, extending loans or guarantees to the project."), choices=FINANCIAL_INSTITUTIONS, blank=True ) @@ -435,14 +530,6 @@ class CaseStudy(models.Model): blank=True ) - # 1.14 - energy_customers = models.TextField( - verbose_name=_("Energy consumers"), - help_text=_("List any wholesale energy customers that take energy from the development. E.g. 'national \ - grids' or private energy suppliers. Please separate with a newline."), - blank=True - ) - # 1.15.1, 1.15.2, 1.15.3 images = models.ManyToManyField( 'files.ImageFile', @@ -500,7 +587,8 @@ class CaseStudy(models.Model): direct_comms = models.TextField( verbose_name=_("Reports of direct communications"), help_text=_("Add any reports of direct communication between community members and \ - representatives of developers/companies/investors."), + representatives of developers/companies/investors. If you have files \ + to upload, you can do this in 'other documents' on the 'uploads' tab."), blank=True, ) @@ -516,8 +604,28 @@ class CaseStudy(models.Model): # Second Screen - Technical and economic analysis ## - # 2.1 - Renewable Energy Generation - # 2.1.1 + sector_of_economy = models.CharField( + verbose_name=_("Sector of economy"), + max_length=3, + choices=SECTOR_CHOICES + ) + + energy_details = models.CharField( + verbose_name=_("Further details"), + help_text=_("Please give more information about the transmission, network or storage technology."), + max_length=200, + blank=True + ) + + ## Energy generation project + + generation_type = models.CharField( + verbose_name=_('What is being generated?'), + max_length=4, + choices=GENERATION_TYPE_CHOICES, + blank=True + ) + generation_technology = models.CharField( verbose_name=_("Generation technology"), help_text=_("Select the type of renewable energy generation that most applies to this case study."), @@ -526,21 +634,34 @@ class CaseStudy(models.Model): blank=True ) - # 2.1.1.12 - # Should be filled in if 2.1.1 was answered as biogas or biomass. + # Should be filled in if generation_technology was answered as bio-energy biomass_detail = models.CharField( - verbose_name=_("Description of feedstock"), - 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)"), + verbose_name=_("Bio-energy feedstock"), + help_text=_("
\ +

Please describe the source of the fuel and how it is processed/used. \ + Please consider:\ +

\ + \ +

We do not expect users to know this information, but if you do \ + it may be useful to give a fuller picture.\ +

"), max_length=200, blank=True ) - # 2.1.1.14 - generation_technology_other = models.CharField( - verbose_name=_("Other generation type"), - help_text=_("If you selected other, please specify the generation technology (e.g. tidal, wave etc)"), - max_length=200, + # 1.14 + energy_customers = models.TextField( + verbose_name=_("Energy service consumers/off-takers"), + help_text=_("List any energy customers/off-takers that take energy from the \ + development. E.g. 'national grids' or private energy suppliers. \ + Also refer to if carbon markets, credits, blockchain etc. are \ + involved in the process. Please separate with a new line."), blank=True ) @@ -552,23 +673,22 @@ class CaseStudy(models.Model): null=True ) - # 2.1.3 - # TODO: Auto-completion based on previous entries so we can query case-studies with the same answer. + # XXX Delete after migration - merge into contractor_or_supplier_of_technology generation_equipment_supplier = models.TextField( - verbose_name=_("Generation equipment supplier"), - help_text=_("Enter the supplier of the generation equipment. (E.g. Siemens)"), + verbose_name=_("Generation equipment supplier(s)"), + help_text=_("Enter the supplier of the generation equipment. (E.g. Siemens Gamesa, GE, Alstom, Vestas, Hanwha Q CELLS, Mitsubishi, First Solar, Jinko Solar, Trina Solar, Suzlon Energy, Statkraft, Shanghai Electric, Ballard Power Systems, Panasonic, etc.)"), blank=True ) # 2.1.4 total_investment = models.IntegerField( verbose_name=_("Total investment (in USD)"), - help_text=_("The approximate total investment for the project in USD."), + help_text=_("The approximate total investment for the project in US dollars."), blank=True, null=True ) - # 2.1.5 + # XXX Delete after migration - merge into additional_technical_details technical_or_economic_details = models.TextField( verbose_name=_("Additional technical or economic details"), help_text=_("Specify any additional technical or economic details relating to the project."), @@ -579,7 +699,6 @@ class CaseStudy(models.Model): # 2.2.1 power_technology = models.CharField( verbose_name=_("Power technology"), - help_text=_("Select the related energy technology."), max_length=2, choices=POWER_TECHNOLOGY_CHOICES, blank=True @@ -587,23 +706,28 @@ class CaseStudy(models.Model): # 2.2.1.4 power_technology_other = models.CharField( - verbose_name=_("Other power technology"), - help_text=_("If you answered 'others', please specify the power technologies."), + verbose_name=_("Further information about power technology"), max_length=128, blank=True ) - # 2.2.2 energy_storage_capacity = models.DecimalField( - verbose_name=_("Energy storage capacity"), - help_text=_("Enter the total capacity of the energy storage system in kilowatt-hours (kWh)."), + verbose_name=_("Total storage capacity (kWh)"), max_digits=20, decimal_places=3, blank=True, null=True, ) - # 2.2.2.1 + energy_transmission_capacity = models.DecimalField( + verbose_name=_("Total transmission capacity (kW)"), + max_digits=20, + decimal_places=3, + blank=True, + null=True, + ) + + # XXX Delete after migration - no merge maximum_power_output = models.DecimalField( verbose_name=_('Maximum power output'), help_text=_('Enter the maximum power output of the storage system in kilowatts (kW).'), @@ -613,25 +737,24 @@ class CaseStudy(models.Model): null=True, ) - # 2.2.2.2 + # XXX Delete after migration - no merge discharge_time = models.DecimalField( verbose_name=_('Time for discharge from full capacity'), help_text=_('Enter the time it takes to discharge from full capacity at maximum power output (in hours).'), max_digits=6, decimal_places=3, blank=True, - null=True, + null=True ) - # 2.2.3 - contractor_or_supplier_of_technology = models.CharField( + # TODO: Auto-completion based on previous entries so we can query case-studies with the same answer. + contractor_or_supplier_of_technology = models.TextField( 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, - blank=True + help_text=_('List companies that act as contractors or suppliers – e.g. Siemens Gamesa, GE, Alstom, Vestas, Hanwha Q CELLS, Mitsubishi, First Solar, Jinko Solar, Trina Solar, Suzlon Energy, Statkraft, Shanghai Electric, Ballard Power Systems, Panasonic, etc'), + blank=True, ) - # 2.2.4 + # XXX Delete after migration - merge into total_investment approximate_total_investment = models.PositiveIntegerField( verbose_name=_('Approximate total investment'), help_text=_('Enter the approximate total investment in USD ($).'), @@ -641,47 +764,46 @@ class CaseStudy(models.Model): ) # 2.2.5 - additional_technical_details = models.CharField( + additional_technical_details = models.TextField( verbose_name=_("Additional technical or economic details"), - help_text=_("Add any additional details such as: length, from-to, voltage, substations etc"), - max_length=512, + help_text=_("Add any additional details such as: length, from-to, voltage, \ + substations, power output, (dis)charge rates, how this technology or \ + project interacts with the energy system (e.g. provides reactive power \ + to ensure power supply in phase etc.)"), blank=True ) - # 2.3.1.1 + ## + # Mining + ## + minerals_or_commodities = models.CharField( - verbose_name=_("Mineral commodity/commodities"), - help_text=_("Select the mineral commodity that is primarily mined in this project"), + verbose_name=_("Primary mineral mined"), + help_text=_("What mineral commodity is primarily mined in this project?"), max_length=3, choices=MINERAL_COMMODITY_CHOICES, blank=True ) - # 2.3.1.2 - minerals_or_commodities_other = models.CharField( - verbose_name=_("Other mineral commodity"), - help_text=_("Enter the mineral commodity that isn't in the list."), - max_length=64, + minerals_or_commodities_other = models.TextField( + verbose_name=_("Other mineral commodities"), + help_text=_("Enter any mineral commodities not in the list. Separate each with a new line."), blank=True ) - # 2.3.2 - use_in_energy_economy = models.CharField( + use_in_energy_economy = MultiSelectField( verbose_name=_("Potential use in renewable energy economy"), - help_text=_("Select the potential use of the minerals in the renewable energy economy"), - max_length=3, + max_length=128, choices=USE_IN_ENERGY_ECONOMY_CHOICES, blank=True ) - # 2.3.2.9 use_in_energy_economy_other = models.CharField( - verbose_name=_('Other use in energy economy'), + verbose_name=_('Other'), max_length=128, blank=True ) - # 2.3.3.1 project_life_span = models.CharField( verbose_name=_("Project life span"), help_text=_("e.g. 12 years of production, 15 years overall"), @@ -689,25 +811,21 @@ class CaseStudy(models.Model): blank=True ) - # 2.3.3.2 size_of_concessions = models.CharField( - verbose_name=_("Size of concessions"), - help_text=_("Describe the size of concession(s) granted to company/companies (e.g. 'one concession encompassing\ - 2,300 hectares')"), + verbose_name=_("Size of concessions (land/marine area)"), + help_text=_("Describe the size of concession(s) granted to company/companies (e.g. 'one concession of 2,300 hectares')"), max_length=200, blank=True ) - # 2.3.3.3 projected_production_of_commodities = models.CharField( - verbose_name=_("Projected production of key commodities"), - 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'"), + verbose_name=_("Estimated production of key commodities"), + help_text=_('Describe the projected production of commodities per annum and overall.
\ + For example, "40 million tonnes of iron ore per year", "200 million tonnes over 5 year life of mine"'), max_length=256, blank=True ) - # 2.3.4 type_of_extraction = models.CharField( verbose_name=_("Type of extraction"), max_length=3, @@ -715,7 +833,6 @@ class CaseStudy(models.Model): blank=True ) - # 2.3.5 associated_infrastructure = models.CharField( verbose_name=_("Associated infrastructure in the locality"), help_text=_("List any associated infrastructure in the locality (e.g. tailings dams/mine waste storage and \ @@ -725,103 +842,123 @@ class CaseStudy(models.Model): blank=True ) - ## - # Third Screen - Socio-economic analysis - ## + ## Manufacturing - # 3.1.1 - positive_case_type = models.CharField( - verbose_name=_('What kind of positive case is this entry about?'), - help_text=_('Select the most relevant type of positive case'), - choices=POSITIVE_CASE_TYPE_CHOICES, - max_length=4, - blank=True, - ) - - # 3.1.2 - socioeconomic_benefits = models.TextField( - verbose_name=_('Socio-economic benefits'), - 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'), + manufacturing_type = models.CharField( + verbose_name=_("Which of the following options best describes this case?"), + max_length=16, + choices=MANUFACTURING_TYPE_CHOICES, + blank=True + ) + + manufacturing_description = models.TextField( + verbose_name=_("Description"), + help_text=_("Briefly describe manufacturing process and components/outputs.\ + (less than 500 characters, about 2 tweets)."), + max_length=500, + blank=True + ) + + manufacturing_related_tech = MultiSelectField( + verbose_name=_("What technology is this case related to?"), + max_length=128, + choices=MANUFACTURING_RELATED_CHOICES, + blank=True + ) + + manufacturing_factors = MultiSelectField( + verbose_name=_("Choose the factors that make this case remarkable, in a positive or negative way"), + max_length=128, + choices=MANUFACTURING_FACTORS_CHOICES, + blank=True + ) + + manufacturing_factors_description = models.TextField( + verbose_name=_("Describe these factors"), + blank=True + ) + + manufacturing_ownership = models.TextField( + verbose_name=_("Describe the ownership structure of the project and its relation with the local community"), + blank=True + ) + + + ## + # Socio-economic analysis + ## + + positive_or_negative = models.CharField( + verbose_name=_("What is the relationship of local community organization(s) to this project?"), + max_length=1, + choices=POSITIVE_NEGATIVE_CHOICES + ) + + positive_case_type = MultiSelectField( + verbose_name=_('What kind of case is this entry about?'), + choices=POSITIVE_CASE_TYPE_CHOICES, + max_length=32, + blank=True, + ) + + negative_case_reasons = MultiSelectField( + verbose_name=("What kind of case is this entry about?"), + choices=NEGATIVE_CASE_REASONS_CHOICES, + blank=True + ) + + socioeconomic_benefits = models.TextField( + verbose_name=_('Socio-economic impacts'), + blank=True + ) + + negative_socioenvironmental_impacts = models.TextField( + verbose_name=_("Describe the socio-environmental impacts (positive and negative):"), + help_text=_("Provide a detailed description of the socio-environmental impacts \ + (please provide all relevant details, such as type of ecosystem and \ + presence of any existing reserve in the area, land to have increased \ + biodiversity as a result of the project, new protection of lands/waters, \ + 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."), + blank=True + ) + + isolated_or_widespread = models.TextField( + verbose_name=_("Is the project part of developments which are causing a cumulative effect?"), + help_text=_("Is this an isolated project or are there similar projects in the same \ + geographic area? If so, can you describe them? Is there an analysis of \ + cumulative or synergetic effects?"), blank=True ) - # 3.1.3 + 3.2.5 key_actors_involved = models.TextField( verbose_name=_('Key actors involved (individual/organisational)'), 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"), + verbose_name=_('Current status of the case'), + help_text=_("Describe the current situation and likely future scenarios."), blank=True ) - # 3.1.5 - obstacles_and_hindrances = models.CharField( - verbose_name=_('Obstacles and hindrances'), - help_text=_('List any obstacles or hindrances experienced in the course of the project'), + obstacles_and_hindrances = models.TextField( + verbose_name=_('Current status of the organizing process around this case'), + help_text=_('Please describe the status of the organizing process, including the obstacles and hindrances faced.'), max_length=512, blank=True ) - # 3.1.6 identified_partnerships = models.CharField( verbose_name=_('Identified partnerships'), - help_text=_('Are you looking for partnerships or have any clearly identified need? If so, please describe it \ - here.'), + help_text=_('Are you, or the organizing process that you represent, looking for partnerships, \ + or have any clearly identified need? If so, please describe and we will try \ + to connect you to appropriate partners.'), max_length=256, blank=True ) - # 3.1.7.1 + 3.2.8.1 - contact_email = models.EmailField( - verbose_name=_('Email address'), - blank=True - ) - - # 3.1.7.2 + 3.2.8.1 - contact_phone = PhoneNumberField( - verbose_name=_('Phone number'), - help_text=_('Please include the international prefix, beginning with "+".'), - blank=True - ) - - # 3.1.7.3 + 3.2.8.1 - contact_website = models.URLField( - verbose_name=_('Website'), - blank=True - ) - - # 3.1.7.4 + 3.2.8.1 - contact_twitter = models.CharField( - verbose_name=_('Twitter username'), - max_length=50, - blank=True - ) - - # 3.1.7.5 + 3.2.8.1 - contact_facebook = models.URLField( - verbose_name=_('Facebook page'), - blank=True - ) - - # 3.1.7.6 + 3.2.8.1 - contact_other = models.TextField( - verbose_name=_('Other contact details'), - blank=True - ) - - # 3.2.1 - negative_case_reasons = MultiSelectField( - verbose_name=("Reasons this is a negative case study"), - choices=NEGATIVE_CASE_REASONS_CHOICES, - blank=True - ) - # 3.2.1.9 negative_case_reasons_other = models.CharField( verbose_name=_("Other reason for negative case"), @@ -831,30 +968,11 @@ class CaseStudy(models.Model): blank=True ) - # 3.2.2 - negative_socioenvironmental_impacts = models.TextField( - verbose_name=_("Describe the negative socio-environmental impacts"), - 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."), - blank=True - ) - - # 3.2.3 - isolated_or_widespread = models.TextField( - 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?"), - blank=True - ) - # 3.2.4.1 when_did_organising_start = models.CharField( verbose_name=_("When did local organising efforts begin?"), - help_text=_("Before the project started? During project implementation? After project implementation? \ - Describe in your own words."), + help_text=_("Before the project started? During project implementation? \ + After project implementation? Describe in your own words."), max_length=512, blank=True ) @@ -872,7 +990,7 @@ class CaseStudy(models.Model): blank=True ) - # 3.2.6 + # XXX delete after migration - merge with identified_partnerships potential_partnerships = models.CharField( verbose_name=_("Describe potential partnerships"), help_text=_("Are you looking for partnerships or do you have any clearly identified need? If so, please \ @@ -889,8 +1007,46 @@ class CaseStudy(models.Model): default=True ) + ## - # Fourth Screen - Uploads + # Contact details + ## + + contact_email = models.EmailField( + verbose_name=_('Email address'), + blank=True + ) + + contact_phone = PhoneNumberField( + verbose_name=_('Phone number'), + help_text=_('Please include the international prefix, beginning with "+".'), + blank=True + ) + + contact_website = models.URLField( + verbose_name=_('Website'), + blank=True + ) + + contact_twitter = models.CharField( + verbose_name=_('Twitter username'), + max_length=50, + blank=True + ) + + contact_facebook = models.URLField( + verbose_name=_('Facebook page'), + blank=True + ) + + contact_other = models.TextField( + verbose_name=_('Other contact details'), + blank=True + ) + + + ## + # Uploads ## # 4.1 @@ -898,7 +1054,8 @@ class CaseStudy(models.Model): 'files.File', related_name='official_project_document_for', verbose_name=_("Official project documents"), - help_text=_("Attach any legal or official documents that relate to the project."), + help_text=_("Attach any legal or official documents that relate to the project. \ + Hold down Control, or Command on a Mac, to select more than one."), blank=True, ) @@ -907,37 +1064,11 @@ class CaseStudy(models.Model): 'files.File', related_name='other_document_for', verbose_name=_("Other documents"), - help_text=_("Attach any other documents that relate to the project."), + help_text=_("Attach any other documents that relate to the project. \ + Hold down Control, or Command on a Mac, to select more than one."), blank=True, ) - # 4.3.1 - shapefiles = models.ManyToManyField( - 'files.File', - related_name='shapefile_for', - verbose_name=_("Shapefiles"), - help_text=_("If you have territory that you would like to show in relation to this project - e.g. Bienes \ - Comunales de Ixtepec etc. This is a set of 3 or more (often 5-6) files with file extensions like \ - .cpg, .dbf, .prj, .qpj, .shp, .shx"), - blank=True - ) - - # 4.3.2 - coordinate_reference_system = models.ForeignKey( - SpatialRefSys, - null=True, - blank=True, - default=4326, - on_delete=models.PROTECT - ) - - # 4.3.3 - name_of_territory_or_area = models.CharField( - verbose_name=_("Name of territory or area"), - max_length=512, - blank=True - ) - # 4.4 shown_on_other_platforms = models.BooleanField( verbose_name=_("Is this case study shown on other platforms?"), @@ -984,33 +1115,6 @@ class CaseStudy(models.Model): """Gets the 11 number video ID from the video field.""" return parse.urlparse(self.video).path - def get_negative_case_reasons_no_other(self): - """Return a list of negative case reasons, minus the 'other' choice (if selected)""" - choices = self.get_negative_case_reasons_list() - - if choices.count(self.NEGATIVE_CASE_REASONS_OTHER_TEXT) > 0: - choices.remove(self.NEGATIVE_CASE_REASONS_OTHER_TEXT) - - return choices - - def get_renewable_generation_detail(self): - """Prepend appropriate descriptive text when accessing renewable generation type.""" - - if self.generation_technology: - if self.generation_technology.endswith('WE'): - return _('Wind energy') + " – " + self.get_generation_technology_display() - elif self.generation_technology.endswith('PV'): - return _('Photovoltaic electricity') + " – " + self.get_generation_technology_display() - elif self.generation_technology.endswith('HYD'): - return _('Hydroelectric') + " – " + self.get_generation_technology_display() - elif self.generation_technology == 'OTHR': - return self.generation_technology_other - else: - return self.get_generation_technology_display() - - else: - return "" - class Meta: verbose_name_plural = 'case studies' diff --git a/apps/map/templates/map/detail.html b/apps/map/templates/map/detail.html index 2e04fca..1f6036f 100644 --- a/apps/map/templates/map/detail.html +++ b/apps/map/templates/map/detail.html @@ -117,12 +117,13 @@ dd ul { padding-left: 0; margin-left: 0; } {% endif %} {% if case_study.land_ownership %} -
{% trans "Land ownership" %}: - {% if case_study.land_ownership == 'OTH' %} -
{{ case_study.land_ownership_details }} - {% else %} -
{{ case_study.get_land_ownership_display }} - {% endif %} +
{% trans "Land ownership and tenure" %}: +
+ {% if case_study.land_ownership != 'OTH' %} + {{ case_study.get_land_ownership_display }} + {% endif %} + + {{ case_study.land_ownership_details | linebreaks }} {% endif %} {% if case_study.type_of_ecosystem %} @@ -137,13 +138,10 @@ dd ul { padding-left: 0; margin-left: 0; } - {% if case_study.affects_indigenous %} + {% if case_study.affected_communities %}

{% trans "Affected groups of people" %}

-

{% trans "Indigenous people" %}

- {{ case_study.people_affected_indigenous | linebreaks }} - -

{% trans "Non-indigenous people" %}

+ {{ case_study.get_affected_communities_display }} {{ case_study.people_affected_other | linebreaks }} {% endif %} @@ -156,12 +154,12 @@ dd ul { padding-left: 0; margin-left: 0; } {% endif %} {% if case_study.start_year %} -
{% trans "Start year" %}: +
{% trans "Construction start year" %}:
{{ case_study.start_year }} {% endif %} {% if case_study.completion_year %} -
{% trans "Completion year" %}: +
{% trans "Operation start year" %}:
{{ case_study.completion_year }} {% endif %} @@ -170,6 +168,11 @@ dd ul { padding-left: 0; margin-left: 0; }
{{ case_study.project_owners }} {% endif %} + {% if case_study.consultants_contractors %} +
{% trans "Consultants and contractors" %}: +
{{ case_study.consultants_contractors }} + {% endif %} + {% if case_study.shareholders %}
{% trans "Shareholders of the project owners" %}:
{{ case_study.shareholders }} @@ -177,7 +180,9 @@ dd ul { padding-left: 0; margin-left: 0; } {% if case_study.financial_institutions %}
{% trans "Financial institutions" %}: -
{{ case_study.financial_institutions }} +
+ {{ case_study.get_financial_institutions_display }} + {{ case_study.financial_institutions_other }} {% endif %} {% if case_study.energy_customers %} @@ -241,17 +246,24 @@ dd ul { padding-left: 0; margin-left: 0; }

Technical and economic analysis

{% if case_study.sector_of_economy == 'RN' %} - +
+ {% if case_study.generation_type %} +
{% trans "What is being generated?" %}: +
+ {{ case_study.get_generation_type_detail }} + {% endif %} + {% if case_study.generation_technology %}
{% trans "Generation technology" %}:
- {{ case_study.get_renewable_generation_detail }} +

{{ case_study.get_generation_technology_display }} +

{{ case_study.energy_details }} {% endif %} - {% if case_study.generation_technology == 'BIOG' or case_study.generation_technology == 'OTHB' %} -

{% trans "Feedstock" %}: + {% if case_study.generation_technology == 'BIO' %} +
{% trans "Bio-energy feedstock" %}:
{{ case_study.biomass_detail }} {% endif %} @@ -274,55 +286,45 @@ dd ul { padding-left: 0; margin-left: 0; } ${{ case_study.total_investment | intcomma }} (USD) {% endif %} - {% if case_study.technical_or_economic_details %} + {% if case_study.additional_technical_details %}
{% trans "Additional technical or economic details" %}: -
- {{ case_study.technical_or_economic_details | linebreaks }} +
+ {{ case_study.additional_technical_details | linebreaks }} {% endif %} -
- {% elif case_study.sector_of_economy == 'PG' %} - + {% elif case_study.sector_of_economy == 'PG' or case_study.sector_of_economy == 'ST' %} +
{% if case_study.power_technology %}
{% trans "Generation technology" %}:
- {% if case_study.power_technology == 'OT' %} - {{ case_study.power_technology_other }} - {% else %} - {{ case_study.power_technology }} - {% endif %} +

{{ case_study.power_technology }} +

{{ case_study.power_technology_other }} {% endif %} {% if case_study.energy_storage_capacity %}

{% trans "Energy storage capacity" %}:
- {{ case_study.energy_storage_capacity }} TODO UNITS? + {{ case_study.energy_storage_capacity }} kWh {% endif %} - {% if case_study.maximum_power_output %} -
{% trans "Maximum power output" %}: -
- {{ case_study.maximum_power_output | intcomma }} W + {% if case_study.energy_transmission_capacity %} +
{% trans "Energy transmission capacity" %}: +
+ {{ case_study.energy_transmission_capacity }} kW {% endif %} - {% if case_study.discharge_time %} -
{% trans "Time for discharge from full capacity" %}: -
- {{ case_study.discharge_time | intcomma }} {% trans "seconds" %} + {% if case_study.generation_equipment_supplier %} +
{% trans "Generation equipment supplier" %}: +
+ {{ case_study.generation_equipment_supplier }} {% endif %} - {% if case_study.contractor_or_supplier_of_technology %} -
{% trans "Contractor and/or supplier of technology" %}: -
- {{ case_study.contractor_or_supplier_of_technology }} - {% endif %} - - {% if case_study.approximate_total_investment %} + {% if case_study.total_investment %}
{% trans "Approximate total investment" %}: -
- ${{ case_study.approximate_total_investment | intcomma }} (USD) +
+ ${{ case_study.total_investment | intcomma }} (USD) {% endif %} {% if case_study.additional_technical_details %} @@ -330,30 +332,33 @@ dd ul { padding-left: 0; margin-left: 0; }
{{ case_study.additional_technical_details | linebreaks }} {% endif %} +
{% elif case_study.sector_of_economy == 'SM' %} - +
{% if case_study.minerals_or_commodities %} -
{% trans "Mineral commodity/commodities" %}: +
{% trans "Primary mineral mined" %}:
- {% if case_study.minerals_or_commodities == 'OTR' %} - {{ case_study.minerals_or_commodities_other }} - {% else %} - {{ case_study.get_minerals_or_commodities_display }} + {% if case_study.minerals_or_commodities != 'OTR' %} +

{{ case_study.get_minerals_or_commodities_display }} {% endif %} + + {{ case_study.minerals_or_commodities_other | linebreaks }} {% endif %} {% if case_study.use_in_energy_economy %}

{% trans "Potential use in renewable energy economy" %}:
- {% if case_study.use_in_energy_economy == 'OTR' %} - {{ case_study.use_in_energy_economy_other }} - {% else %} + {% if case_study.use_in_energy_economy != 'OTR' %} {{ case_study.get_use_in_energy_economy_display }} {% endif %} + + {% if case_study.use_in_energy_economy_other %} + {{ case_study.use_in_energy_economy_other }} + {% endif %} {% endif %} {% if case_study.project_life_span %} @@ -369,7 +374,7 @@ dd ul { padding-left: 0; margin-left: 0; } {% endif %} {% if case_study.projected_production_of_commodities %} -
{% trans "Projected production of key commodities" %}: +
{% trans "Estimated production of key commodities" %}:
{{ case_study.projected_production_of_commodities }} {% endif %} @@ -387,29 +392,85 @@ dd ul { padding-left: 0; margin-left: 0; } {% endif %}
+ {% elif case_study.sector_of_economy == 'MA' %} + + +
+ {% if case_study.manufacturing_type %} +
{% trans "Manufacturing process" %}: +
+ {{ case_study.get_manufacturing_type_display }} + {% endif %} + + {% if case_study.manufacturing_description %} +
{% trans "Description" %}: +
+ {{ case_study.manufacturing_description }} + {% endif %} + + {% if case_study.manufacturing_related_tech %} +
{% trans "Related technology" %}: +
{% trans "Remarkable factors" %}: +
+ {{ case_study.get_manufacturing_factors_display }} + {% endif %} + + {% if case_study.manufacturing_factors_description %} +
{% trans "More info" %}: +
+ {{ case_study.manufacturing_factors_description }} + {% endif %} + + {% if case_study.manufacturing_factors_ownership %} +
{% trans "Ownership information" %}: +
+ {{ case_study.manufacturing_factors_ownership }} + {% endif %} +
+ {% endif %}

Socio-economic analysis

-
{% trans "Case type" %} +
{% trans "Kind of organising process around this project" %}
{{ case_study.get_positive_or_negative_display }} - {% if case_study.positive_or_negative == "P" %} - +
{% trans "This is case is about" %}: +
+
    - {% if case_study.positive_case_type %} -
    {% trans "Type of positive case" %}: -
    - {{ case_study.get_positive_case_type_display }} - {% endif %} + {% if case_study.positive_case_type %} + {% for text in case_study.get_positive_case_type_list %} +
  • {{ text }} + {% endfor %} + {% endif %} + + {% if case_study.negative_case_reasons %} + {% for text in case_study.get_negative_case_reasons_list %} +
  • {{ text }} + {% endfor %} + {% endif %} + +
{% if case_study.socioeconomic_benefits %} -
{% trans "Socio-economic benefits" %}: +
{% trans "Socio-economic impacts" %}
{{ case_study.socioeconomic_benefits }} {% endif %} + {% if case_study.isolated_or_widespread %} +
{% trans "Is the project part of developments which are causing a cumulative effect?" %} +
+ {{ case_study.isolated_or_widespread }} + {% endif %} + {% if case_study.key_actors_involved %}
{% trans "Key actors involved" %}:
@@ -417,53 +478,23 @@ dd ul { padding-left: 0; margin-left: 0; } {% endif %} {% if case_study.project_status_detail %} -
{% trans "Current status of project" %}: +
{% trans "Current status of the case" %}:
{{ case_study.project_status_detail }} {% endif %} {% if case_study.obstacles_and_hindrances %} -
{% trans "Obstacles and hindrances" %}: +
{% trans "Current status of the organizing process around this case" %}:
{{ case_study.obstacles_and_hindrances }} {% endif %} - {% if case_study.identified_partnerships %} -
{% trans "Identified partnerships" %}: -
- {{ case_study.identified_partnerships }} - {% endif %} - - - {% else %} - - - {% if case_study.negative_case_reasons %} -
{% trans "Reasons this is a negative case study" %}: -
-
    - {% for text in case_study.get_negative_case_reasons_no_other %} -
  • {{ text }} - {% endfor %} - - {% if case_study.negative_case_reasons_other %} -
  • {{ case_study.negative_case_reasons_other }} - {% endif %} -
- {% endif %} - {% if case_study.negative_socioenvironmental_impacts %} -
{% trans "Negative socio-environmental impacts" %}: +
{% trans "Socio-environmental impacts" %}:
{{ case_study.negative_socioenvironmental_impacts }} {% endif %} - {% if case_study.isolated_or_widespread %} -
{% trans "Isolated or commonplace" %}: -
- {{ case_study.isolated_or_widespread }} - {% endif %} - {% if case_study.when_did_organising_start %}
{% trans "Local organising efforts began" %}:
@@ -476,13 +507,17 @@ dd ul { padding-left: 0; margin-left: 0; } {{ case_study.who_has_been_involved }} {% endif %} - {% if case_study.potential_partnerships %} -
{% trans "Potential partnerships" %}: -
- {{ case_study.potential_partnerships }} + {% if case_study.participation_mechanisms %} +
{% trans "Mechanisms of participation" %}: +
+ {{ case_study.participation_mechanisms }} {% endif %} - {% endif %} + {% if case_study.identified_partnerships %} +
{% trans "Identified partnerships" %}: +
+ {{ case_study.identified_partnerships }} + {% endif %}
diff --git a/apps/map/templates/map/form-case_study.html b/apps/map/templates/map/form-case_study.html index 33b9269..e1c276a 100644 --- a/apps/map/templates/map/form-case_study.html +++ b/apps/map/templates/map/form-case_study.html @@ -4,9 +4,14 @@ {% block stylesheets %} {{ block.super }} {% leaflet_css %} + {% endblock %} -{% block page_title %}{% trans "Submit a Case Study" %} - {{ block.super }}{% endblock %} +{% block page_title %}{% trans "New Case Study" %} - {{ block.super }}{% endblock %} +{% block title %}{% trans "New Case Study" %}{% endblock %} + {% block description %}{% trans "Here you can submit a case study for review and it will be added to the map." %}{% endblock %} {% block inner %} @@ -40,158 +45,195 @@ - {% endblock %} diff --git a/apps/map/templates/map/form-selector.html b/apps/map/templates/map/form-selector.html index 9bc1875..882d5e6 100644 --- a/apps/map/templates/map/form-selector.html +++ b/apps/map/templates/map/form-selector.html @@ -80,6 +80,8 @@ +

If you are interested in writing a technology assessment or policy analysis to appear on this site, please email info@ojuso.org.

+ diff --git a/apps/map/tests.py b/apps/map/tests.py index d8ff558..77367c0 100644 --- a/apps/map/tests.py +++ b/apps/map/tests.py @@ -83,38 +83,10 @@ class CaseStudyDraftAPITests(TestCase): class CaseStudyTests(TestCase): - def test_get_renewable_generation_detail_when_empty(self): - """get_renewable_generation_detail() should return the empty string.""" + def test_youtube(self): case_study = CaseStudy() - self.assertIs(case_study.get_renewable_generation_detail(), "") + case_study.video = "https://www.youtube.com/watch?v=h2V4-UP7ML0" + self.assertIs(case_study.is_video_youtube(), True) - def test_get_renewable_generation_detail_with_geo(self): - """get_renewable_generation_detail() should return just the description""" - case_study = CaseStudy(generation_technology='GEOT') - self.assertEqual(case_study.get_renewable_generation_detail(), "Geothermal electricity") - - def test_get_renewable_generation_detail_with_wind(self): - """get_renewable_generation_detail() should return the description prefixed with 'wind power'""" - case_study = CaseStudy(generation_technology='SSWE') - self.assertTrue(case_study.get_renewable_generation_detail().startswith("Wind energy")) - - def test_get_renewable_generation_detail_with_other(self): - """get_renewable_generation_detail() should return the detail provided in .generation_technology_other""" - case_study = CaseStudy(generation_technology='OTHR', generation_technology_other='Warp drive') - self.assertEqual(case_study.get_renewable_generation_detail(), "Warp drive") - - def test_get_negative_case_reasons_no_other_1(self): - """Test with case having no 'other' entry""" - case_study = CaseStudy(negative_case_reasons=['VOLR','ALAB']) - self.assertEqual(case_study.get_negative_case_reasons_no_other(), - [ 'Violation of land rights' - , 'Abusive labour practices' - ]) - - def test_get_negative_case_reasons_no_other_2(self): - """Test with case having an 'other' entry""" - case_study = CaseStudy(negative_case_reasons=['VOLR','ALAB','OTHR']) - self.assertEqual(case_study.get_negative_case_reasons_no_other(), - [ 'Violation of land rights' - , 'Abusive labour practices' - ]) + # case_study.video = "https://youtu.be/h2V4-UP7ML0" + # self.assertIs(case_study.is_video_youtube(), True) diff --git a/apps/map/views.py b/apps/map/views.py index 0a34a95..4dffba6 100644 --- a/apps/map/views.py +++ b/apps/map/views.py @@ -75,18 +75,18 @@ class BaseForm(LoginRequiredMixin, CreateView): self.object = form.save() - self.object.official_project_documents = form.cleaned_data.get( + self.object.official_project_documents.set(form.cleaned_data.get( 'official_project_documents_files', [] - ) - self.object.other_documents = form.cleaned_data.get( + )) + self.object.other_documents.set(form.cleaned_data.get( 'other_documents_files', [] - ) - self.object.shapefiles = form.cleaned_data.get( + )) + self.object.shapefiles.set(form.cleaned_data.get( 'shapefiles_files', [] - ) - self.object.images = form.cleaned_data.get( + )) + self.object.images.set(form.cleaned_data.get( 'images_files', [] - ) + )) self.object.author = self.request.user self.object.save() diff --git a/assets/css/ojuso.css b/assets/css/ojuso.css index e61764e..345f519 100644 --- a/assets/css/ojuso.css +++ b/assets/css/ojuso.css @@ -1,3 +1,7 @@ +h1 { + font-weight: bold; +} + /* Make sure that the footer doesn't have space after it */ .container { min-height: 60vh; } @@ -146,6 +150,12 @@ } +/* socio-environmental analysis tab styles */ +.organising { + display: none; +} + + /* * HOME PAGE */ diff --git a/ojusomap/templates/base_page.html b/ojusomap/templates/base_page.html index 99b138a..335072b 100644 --- a/ojusomap/templates/base_page.html +++ b/ojusomap/templates/base_page.html @@ -5,8 +5,8 @@ {{ block.super }} {% endblock %} @@ -16,8 +16,8 @@
-

{% block title %}{% endblock %}

-

{% block description %}{% endblock %}

+

{% block title %}{% endblock %}

+

{% block description %}{% endblock %}

{% block inner %} diff --git a/ojusomap/tests.py b/ojusomap/tests.py index d9d377f..ee7f3d5 100644 --- a/ojusomap/tests.py +++ b/ojusomap/tests.py @@ -119,14 +119,14 @@ class MapTest(SeleniumTest): self.sl.find_element_by_id('id_entry_name').send_keys('Short Entry'); Select(self.sl.find_element_by_id('id_country')).select_by_visible_text('Albania'); self.sl.find_element_by_id('id_area_of_land').send_keys('123'); - Select(self.sl.find_element_by_id('id_land_ownership')).select_by_visible_text('Private Land'); + Select(self.sl.find_element_by_id('id_land_ownership')).select_by_visible_text('Private land'); Select(self.sl.find_element_by_id('id_location_context')).select_by_visible_text('Urban'); self.sl.find_element_by_id('id_describe_ecosystem').send_keys('test'); - Select(self.sl.find_element_by_id('id_project_status')).select_by_visible_text('Existing Project'); - Select(self.sl.find_element_by_id('id_sector_of_economy')).select_by_visible_text('Power Grids'); + Select(self.sl.find_element_by_id('id_project_status')).select_by_visible_text('In planning and design'); + self.sl.find_element_by_css_selector('[name=sector_of_economy][value=ST]').click() self.sl.find_element_by_id('id_synopsis').send_keys('test'); self.sl.find_element_by_id('id_full_description').send_keys('test'); - Select(self.sl.find_element_by_id('id_positive_or_negative')).select_by_visible_text('Positive'); + Select(self.sl.find_element_by_id('id_positive_or_negative')).select_by_visible_text('There is/was an organising process in favour of the project'); # you can submit the form on any field. Using this one because the submit button sometimes isn't visible self.sl.find_element_by_id('id_area_of_land').submit(); self.assertTrue("Thanks!" in self.sl.page_source, "Success message not shown") @@ -140,18 +140,18 @@ class MapTest(SeleniumTest): self.sl.find_element_by_id('id_entry_name').send_keys('Long Entry'); Select(self.sl.find_element_by_id('id_country')).select_by_visible_text('Albania'); self.sl.find_element_by_id('id_area_of_land').send_keys('123'); - Select(self.sl.find_element_by_id('id_land_ownership')).select_by_visible_text('Private Land'); + Select(self.sl.find_element_by_id('id_land_ownership')).select_by_visible_text('Private land'); Select(self.sl.find_element_by_id('id_location_context')).select_by_visible_text('Urban'); self.sl.find_element_by_id('id_describe_ecosystem').send_keys('test'); - Select(self.sl.find_element_by_id('id_project_status')).select_by_visible_text('Existing Project'); + Select(self.sl.find_element_by_id('id_project_status')).select_by_visible_text('In planning and design'); self.sl.find_element_by_id('id_synopsis').send_keys('test'); self.sl.find_element_by_id('id_full_description').send_keys('test'); self.sl.find_element_by_id('id_project_owners').send_keys('test'); self.sl.find_element_by_id('id_shareholders').send_keys('test'); self.sl.find_element_by_css_selector('a[href="#technical-and-economic-analysis"]').click() - Select(self.sl.find_element_by_id('id_sector_of_economy')).select_by_visible_text('Power Grids'); + self.sl.find_element_by_css_selector('[name=sector_of_economy][value=ST]').click() self.sl.find_element_by_css_selector('a[href="#socio-environmental-analysis"]').click() - Select(self.sl.find_element_by_id('id_positive_or_negative')).select_by_visible_text('Positive'); + Select(self.sl.find_element_by_id('id_positive_or_negative')).select_by_visible_text('There is/was an organising process in favour of the project'); self.sl.find_element_by_css_selector('a[href="#uploads"]').click() # you can submit the form on any field. Using this one because the submit button sometimes isn't visible self.sl.find_element_by_id('id_name_of_territory_or_area').submit();