Through to the end

This commit is contained in:
2018-11-25 13:48:52 +00:00
parent d87604c6bd
commit 9384b6c9cb
4 changed files with 246 additions and 224 deletions

View File

@ -107,7 +107,7 @@ class CaseStudy(models.Model):
('UCONST', _('Under construction')),
('EXSTNG', _('In operation')),
('DECOMM', _('Undergoing decommissioning')),
('END', _('Decommissioned]')),
('END', _('Decommissioned')),
)
FINANCIAL_INSTITUTIONS = (
@ -271,10 +271,11 @@ class CaseStudy(models.Model):
)
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')),
('OTHR', _('Other(s)'))
)
NEGATIVE_CASE_REASONS_OTHER_TEXT = _('Other reasons')
@ -324,6 +325,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
##
@ -338,11 +378,6 @@ class CaseStudy(models.Model):
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"),
@ -350,14 +385,6 @@ class CaseStudy(models.Model):
choices=SECTOR_CHOICES
)
# 1.3
positive_or_negative = models.CharField(
verbose_name=_("What is the relationship of local community organization(s) to this project?"),
help_text=_("Please reflect the perspective of the organization(s) or person(s) describing the case."),
max_length=1,
choices=POSITIVE_NEGATIVE_CHOICES
)
# 1.4
country = CountryField(
verbose_name=_("Country"),
@ -852,102 +879,81 @@ class CaseStudy(models.Model):
##
# Third Screen - Socio-economic analysis
# Socio-economic analysis
##
# 3.1.1
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 = models.CharField(
verbose_name=_('What kind of positive case is this entry about?'),
verbose_name=_('What kind of 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'),
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"),
@ -957,30 +963,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
)
@ -998,15 +985,6 @@ class CaseStudy(models.Model):
blank=True
)
# 3.2.6
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 \
describe it here."),
max_length=512,
blank=True
)
# 3.2.7
wants_conversation_with_ojuso = models.BooleanField(
verbose_name=_("Would you like to have a conversation with the ojuso team?"),
@ -1015,8 +993,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
@ -1024,7 +1040,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,
)
@ -1033,37 +1050,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?"),