diff --git a/apps/api/urls.py b/apps/api/urls.py index c3db09f..19d7426 100644 --- a/apps/api/urls.py +++ b/apps/api/urls.py @@ -12,7 +12,7 @@ from apps.map.models import CaseStudy, PointOfInterest from . import views apirouter = routers.DefaultRouter() -apirouter.register(r'case-studies', views.CaseStudyViewSet) -apirouter.register(r'points-of-interest', views.PointOfInterestViewSet) +apirouter.register(r"case-studies", views.CaseStudyViewSet) +apirouter.register(r"points-of-interest", views.PointOfInterestViewSet) urlpatterns = apirouter.urls diff --git a/apps/api/views.py b/apps/api/views.py index 4348afb..2e48253 100644 --- a/apps/api/views.py +++ b/apps/api/views.py @@ -13,7 +13,7 @@ from apps.map.models import CaseStudy, PointOfInterest class UserSerializer(serializers.HyperlinkedModelSerializer): class Meta: model = User - fields = ('url', 'username', 'email', 'is_staff') + fields = ("url", "username", "email", "is_staff") class UserViewSet(viewsets.ModelViewSet): @@ -24,28 +24,30 @@ class UserViewSet(viewsets.ModelViewSet): class FileSerializer(serializers.HyperlinkedModelSerializer): class Meta: model = File - fields = ('file',) + fields = ("file",) class CaseStudySerializer(gis_serializers.GeoFeatureModelSerializer): - sector_of_economy = serializers.CharField(source='get_sector_of_economy_display') - country_name = serializers.CharField(source='get_country_display') - positive_or_negative_display = serializers.CharField(source='get_positive_or_negative_display') + sector_of_economy = serializers.CharField(source="get_sector_of_economy_display") + country_name = serializers.CharField(source="get_country_display") + positive_or_negative_display = serializers.CharField( + source="get_positive_or_negative_display" + ) images = FileSerializer(many=True) class Meta: model = CaseStudy geo_field = "location" fields = ( - 'country', - 'country_name', - 'entry_name', - 'images', - 'location', - 'positive_or_negative', - 'positive_or_negative_display', - 'sector_of_economy', - 'slug' + "country", + "country_name", + "entry_name", + "images", + "location", + "positive_or_negative", + "positive_or_negative_display", + "sector_of_economy", + "slug", ) @@ -54,20 +56,13 @@ class CaseStudyViewSet(viewsets.ModelViewSet): serializer_class = CaseStudySerializer - class PointOfInterestSerializer(gis_serializers.GeoFeatureModelSerializer): class Meta: model = PointOfInterest geo_field = "location" - fields = ( - 'title', - 'synopsis', - 'link', - 'slug' - ) + fields = ("title", "synopsis", "link", "slug") class PointOfInterestViewSet(viewsets.ModelViewSet): queryset = PointOfInterest.objects.approved() serializer_class = PointOfInterestSerializer - diff --git a/apps/contact/forms.py b/apps/contact/forms.py index 2471534..c709cb0 100644 --- a/apps/contact/forms.py +++ b/apps/contact/forms.py @@ -7,5 +7,4 @@ class ContactForm(ContactForm): def __init__(self, *args, **kwargs): super(ContactForm, self).__init__(*args, **kwargs) self.helper = FormHelper() - self.helper.add_input(Submit('submit', 'Submit', - css_class='btn-lg pull-right')) \ No newline at end of file + self.helper.add_input(Submit("submit", "Submit", css_class="btn-lg pull-right")) diff --git a/apps/contact/urls.py b/apps/contact/urls.py index 7074f9c..ad41b51 100644 --- a/apps/contact/urls.py +++ b/apps/contact/urls.py @@ -2,6 +2,4 @@ from django.conf.urls import url from . import views -urlpatterns = [ - url(r'^$', views.ContactView.as_view(), name='contact'), -] +urlpatterns = [url(r"^$", views.ContactView.as_view(), name="contact")] diff --git a/apps/files/apps.py b/apps/files/apps.py index c86f272..b742dfd 100644 --- a/apps/files/apps.py +++ b/apps/files/apps.py @@ -2,4 +2,4 @@ from django.apps import AppConfig class FilesConfig(AppConfig): - name = 'files' + name = "files" diff --git a/apps/files/forms.py b/apps/files/forms.py index 6cf3056..ea76ea6 100644 --- a/apps/files/forms.py +++ b/apps/files/forms.py @@ -6,9 +6,10 @@ from .models import File, ImageFile class FileForm(forms.ModelForm): class Meta: model = File - exclude = ['user',] + exclude = ["user"] + class ImageFileForm(forms.ModelForm): class Meta: model = ImageFile - exclude = ['user',] + exclude = ["user"] diff --git a/apps/files/migrations/0001_initial.py b/apps/files/migrations/0001_initial.py index 8e39e2a..592d441 100644 --- a/apps/files/migrations/0001_initial.py +++ b/apps/files/migrations/0001_initial.py @@ -9,18 +9,23 @@ class Migration(migrations.Migration): initial = True - dependencies = [ - ] + dependencies = [] operations = [ migrations.CreateModel( - name='File', + name="File", fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('file', models.FileField(upload_to='.')), + ( + "id", + models.AutoField( + auto_created=True, + primary_key=True, + serialize=False, + verbose_name="ID", + ), + ), + ("file", models.FileField(upload_to=".")), ], - options={ - 'abstract': False, - }, - ), + options={"abstract": False}, + ) ] diff --git a/apps/files/migrations/0002_file_user.py b/apps/files/migrations/0002_file_user.py index 12cf0f9..71be947 100644 --- a/apps/files/migrations/0002_file_user.py +++ b/apps/files/migrations/0002_file_user.py @@ -11,14 +11,19 @@ class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), - ('files', '0001_initial'), + ("files", "0001_initial"), ] operations = [ migrations.AddField( - model_name='file', - name='user', - field=models.ForeignKey(default=1, on_delete=django.db.models.deletion.CASCADE, related_name='files', to=settings.AUTH_USER_MODEL), + model_name="file", + name="user", + field=models.ForeignKey( + default=1, + on_delete=django.db.models.deletion.CASCADE, + related_name="files", + to=settings.AUTH_USER_MODEL, + ), preserve_default=False, - ), + ) ] diff --git a/apps/files/migrations/0003_auto_20180526_1547.py b/apps/files/migrations/0003_auto_20180526_1547.py index 9e61436..740db9a 100644 --- a/apps/files/migrations/0003_auto_20180526_1547.py +++ b/apps/files/migrations/0003_auto_20180526_1547.py @@ -11,26 +11,59 @@ class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), - ('files', '0002_file_user'), + ("files", "0002_file_user"), ] operations = [ migrations.CreateModel( - name='ImageFile', + name="ImageFile", fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('file', models.FileField(upload_to='.')), - ('caption', models.CharField(default=None, max_length=240, null=True, verbose_name='Image caption')), - ('credit', models.CharField(default=None, max_length=240, null=True, verbose_name='Image credit')), - ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='imagefile', to=settings.AUTH_USER_MODEL)), + ( + "id", + models.AutoField( + auto_created=True, + primary_key=True, + serialize=False, + verbose_name="ID", + ), + ), + ("file", models.FileField(upload_to=".")), + ( + "caption", + models.CharField( + default=None, + max_length=240, + null=True, + verbose_name="Image caption", + ), + ), + ( + "credit", + models.CharField( + default=None, + max_length=240, + null=True, + verbose_name="Image credit", + ), + ), + ( + "user", + models.ForeignKey( + on_delete=django.db.models.deletion.CASCADE, + related_name="imagefile", + to=settings.AUTH_USER_MODEL, + ), + ), ], - options={ - 'abstract': False, - }, + options={"abstract": False}, ), migrations.AlterField( - model_name='file', - name='user', - field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='file', to=settings.AUTH_USER_MODEL), + model_name="file", + name="user", + field=models.ForeignKey( + on_delete=django.db.models.deletion.CASCADE, + related_name="file", + to=settings.AUTH_USER_MODEL, + ), ), ] diff --git a/apps/files/migrations/0004_auto_20180530_0308.py b/apps/files/migrations/0004_auto_20180530_0308.py index 8e22c52..d2a6298 100644 --- a/apps/files/migrations/0004_auto_20180530_0308.py +++ b/apps/files/migrations/0004_auto_20180530_0308.py @@ -7,19 +7,29 @@ from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [ - ('files', '0003_auto_20180526_1547'), - ] + dependencies = [("files", "0003_auto_20180526_1547")] operations = [ migrations.AlterField( - model_name='imagefile', - name='caption', - field=models.CharField(blank=True, default=None, max_length=240, null=True, verbose_name='Image caption'), + model_name="imagefile", + name="caption", + field=models.CharField( + blank=True, + default=None, + max_length=240, + null=True, + verbose_name="Image caption", + ), ), migrations.AlterField( - model_name='imagefile', - name='credit', - field=models.CharField(blank=True, default=None, max_length=240, null=True, verbose_name='Image credit'), + model_name="imagefile", + name="credit", + field=models.CharField( + blank=True, + default=None, + max_length=240, + null=True, + verbose_name="Image credit", + ), ), ] diff --git a/apps/files/migrations/0005_auto_20180922_1717.py b/apps/files/migrations/0005_auto_20180922_1717.py index 7bc5989..62bd9d2 100644 --- a/apps/files/migrations/0005_auto_20180922_1717.py +++ b/apps/files/migrations/0005_auto_20180922_1717.py @@ -7,15 +7,15 @@ from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [ - ('files', '0004_auto_20180530_0308'), - ] + dependencies = [("files", "0004_auto_20180530_0308")] operations = [ migrations.AlterField( - model_name='imagefile', - name='caption', - field=models.CharField(blank=True, default='', max_length=240, verbose_name='Image caption'), + model_name="imagefile", + name="caption", + field=models.CharField( + blank=True, default="", max_length=240, verbose_name="Image caption" + ), preserve_default=False, - ), + ) ] diff --git a/apps/files/migrations/0006_auto_20180928_1323.py b/apps/files/migrations/0006_auto_20180928_1323.py index 1a01558..94771c4 100644 --- a/apps/files/migrations/0006_auto_20180928_1323.py +++ b/apps/files/migrations/0006_auto_20180928_1323.py @@ -5,15 +5,15 @@ from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [ - ('files', '0005_auto_20180922_1717'), - ] + dependencies = [("files", "0005_auto_20180922_1717")] operations = [ migrations.AlterField( - model_name='imagefile', - name='credit', - field=models.CharField(blank=True, default='', max_length=240, verbose_name='Image credit'), + model_name="imagefile", + name="credit", + field=models.CharField( + blank=True, default="", max_length=240, verbose_name="Image credit" + ), preserve_default=False, - ), + ) ] diff --git a/apps/files/migrations/0007_auto_20181201_2315.py b/apps/files/migrations/0007_auto_20181201_2315.py index b7c4247..cc42842 100644 --- a/apps/files/migrations/0007_auto_20181201_2315.py +++ b/apps/files/migrations/0007_auto_20181201_2315.py @@ -7,19 +7,25 @@ import django.db.models.deletion class Migration(migrations.Migration): - dependencies = [ - ('files', '0006_auto_20180928_1323'), - ] + 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), + 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), + 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/files/models.py b/apps/files/models.py index 04bebd9..5a2809a 100644 --- a/apps/files/models.py +++ b/apps/files/models.py @@ -6,12 +6,8 @@ from apps.map.models import CaseStudy, CaseStudyDraft class BaseFile(models.Model): - file = models.FileField( - upload_to='.', - ) - user = models.ForeignKey( - User, related_name='%(class)s', on_delete=models.PROTECT, - ) + file = models.FileField(upload_to=".") + user = models.ForeignKey(User, related_name="%(class)s", on_delete=models.PROTECT) class Meta: abstract = True @@ -29,13 +25,9 @@ class File(BaseFile): class ImageFile(BaseFile): caption = models.CharField( - verbose_name=_("Image caption"), - max_length=240, - blank=True, + verbose_name=_("Image caption"), max_length=240, blank=True ) credit = models.CharField( - verbose_name=_("Image credit"), - max_length=240, - blank=True, + verbose_name=_("Image credit"), max_length=240, blank=True ) diff --git a/apps/files/tests.py b/apps/files/tests.py index edd8457..77df135 100644 --- a/apps/files/tests.py +++ b/apps/files/tests.py @@ -12,14 +12,16 @@ from .models import File @override_storage() class FileTests(TestCase): - test_user = 'testuser1' - test_pass = '12345' + test_user = "testuser1" + test_pass = "12345" def setUp(self): - test_user1 = User.objects.create_user(username=self.test_user, password=self.test_pass) + test_user1 = User.objects.create_user( + username=self.test_user, password=self.test_pass + ) test_user1.save() - activate('en-gb') + activate("en-gb") self.file = File.objects.create(user=test_user1) @@ -27,19 +29,19 @@ class FileTests(TestCase): return self.client.login(username=self.test_user, password=self.test_pass) def test_post_not_logged_in(self): - url = reverse('files:upload') + url = reverse("files:upload") - next_url = QueryDict.fromkeys(['next',], url) - login_url = reverse('auth_login') + '?' + next_url.urlencode() + next_url = QueryDict.fromkeys(["next"], url) + login_url = reverse("auth_login") + "?" + next_url.urlencode() response = self.client.post(url, follow=True) self.assertRedirects(response, login_url) def test_delete_not_logged_in(self): - url = reverse('files:delete', kwargs={'pk': self.file.pk}) + url = reverse("files:delete", kwargs={"pk": self.file.pk}) - next_url = QueryDict.fromkeys(['next',], url) - login_url = reverse('auth_login') + '?' + next_url.urlencode() + next_url = QueryDict.fromkeys(["next"], url) + login_url = reverse("auth_login") + "?" + next_url.urlencode() response = self.client.post(url, follow=True) self.assertRedirects(response, login_url) @@ -47,21 +49,19 @@ class FileTests(TestCase): def test_post_and_delete(self): login = self.login() - with open('apps/map/static/map/ojuso-logo-white.png', 'rb') as fp: - response = self.client.post(reverse('files:upload_image'), { - 'file': fp - }) + with open("apps/map/static/map/ojuso-logo-white.png", "rb") as fp: + response = self.client.post(reverse("files:upload_image"), {"file": fp}) data = response.json() - self.assertIsInstance(data['id'], int) - self.assertEqual(data['is_valid'], True) + self.assertIsInstance(data["id"], int) + self.assertEqual(data["is_valid"], True) - response = self.client.post(reverse('files:delete_image', kwargs={ - 'pk': data['id'] - })) + response = self.client.post( + reverse("files:delete_image", kwargs={"pk": data["id"]}) + ) self.assertEqual(response.status_code, 200) data = response.json() - self.assertEqual(data['success'], True) + self.assertEqual(data["success"], True) diff --git a/apps/files/urls.py b/apps/files/urls.py index c78b6ec..ca608ed 100644 --- a/apps/files/urls.py +++ b/apps/files/urls.py @@ -1,13 +1,21 @@ from django.conf.urls import url - -from .views import (FileUploadView, FileDeleteView, ImageFileUploadView, - ImageFileDeleteView) -app_name = 'files' +from .views import ( + FileUploadView, + FileDeleteView, + ImageFileUploadView, + ImageFileDeleteView, +) + +app_name = "files" urlpatterns = [ - url(r'^upload/$', FileUploadView.as_view(), name='upload'), - url(r'^upload/image/$', ImageFileUploadView.as_view(), name='upload_image'), - url(r'^delete/(?P\d+)/$', FileDeleteView.as_view(), name='delete'), - url(r'^delete/image/(?P\d+)/$', ImageFileDeleteView.as_view(), name='delete_image'), + url(r"^upload/$", FileUploadView.as_view(), name="upload"), + url(r"^upload/image/$", ImageFileUploadView.as_view(), name="upload_image"), + url(r"^delete/(?P\d+)/$", FileDeleteView.as_view(), name="delete"), + url( + r"^delete/image/(?P\d+)/$", + ImageFileDeleteView.as_view(), + name="delete_image", + ), ] diff --git a/apps/files/views.py b/apps/files/views.py index 8f557ad..abda5dc 100644 --- a/apps/files/views.py +++ b/apps/files/views.py @@ -17,15 +17,17 @@ class FileUploadView(LoginRequiredMixin, FormView): self.object.user = self.request.user self.object.save() - return JsonResponse({ - 'is_valid': True, - 'url': self.object.file.url, - 'name': self.object.file.name, - 'id': self.object.pk - }) + return JsonResponse( + { + "is_valid": True, + "url": self.object.file.url, + "name": self.object.file.name, + "id": self.object.pk, + } + ) def form_invalid(self, form): - return JsonResponse({'is_valid': False, 'errors': form.errors}) + return JsonResponse({"is_valid": False, "errors": form.errors}) class ImageFileUploadView(FileUploadView): @@ -47,9 +49,7 @@ class FileDeleteView(LoginRequiredMixin, DetailView): self.object.delete() - return JsonResponse({ - 'success': True - }) + return JsonResponse({"success": True}) class ImageFileDeleteView(FileDeleteView): diff --git a/apps/map/admin.py b/apps/map/admin.py index 797b81f..2deb84c 100644 --- a/apps/map/admin.py +++ b/apps/map/admin.py @@ -14,16 +14,16 @@ class CaseStudyAdminForm(forms.ModelForm): class Meta: model = CaseStudy widgets = { - 'coordinate_reference_system': autocomplete.ModelSelect2( - url='srs-autocomplete' + "coordinate_reference_system": autocomplete.ModelSelect2( + url="srs-autocomplete" ) } - fields = '__all__' + fields = "__all__" class CaseStudyAdmin(LeafletGeoAdmin): - list_display = ('id', 'date_created', 'entry_name', 'approved', 'author') - actions = ['approve', 'unapprove'] + list_display = ("id", "date_created", "entry_name", "approved", "author") + actions = ["approve", "unapprove"] form = CaseStudyAdminForm def approve(self, request, queryset): @@ -32,9 +32,8 @@ class CaseStudyAdmin(LeafletGeoAdmin): message_bit = "1 case study was" else: message_bit = "{0} case studies were".format(updated) - self.message_user(request, "{0} successfully approved".format( - message_bit - )) + self.message_user(request, "{0} successfully approved".format(message_bit)) + approve.short_description = "Approve selected case studies" def unapprove(self, request, queryset): @@ -43,11 +42,11 @@ class CaseStudyAdmin(LeafletGeoAdmin): message_bit = "1 case study was" else: message_bit = "{0} case studies were".format(updated) - self.message_user(request, "{0} successfully un-approved".format( - message_bit - )) + self.message_user(request, "{0} successfully un-approved".format(message_bit)) + unapprove.short_description = "Un-approve selected case studies" + admin.site.register(CaseStudy, CaseStudyAdmin) admin.site.register(SpatialRefSys) admin.site.register(CaseStudyDraft, CaseStudyDraftAdmin) diff --git a/apps/map/apps.py b/apps/map/apps.py index fb66c9b..69cb69a 100644 --- a/apps/map/apps.py +++ b/apps/map/apps.py @@ -2,4 +2,4 @@ from django.apps import AppConfig class MapConfig(AppConfig): - name = 'map' + name = "map" diff --git a/apps/map/forms.py b/apps/map/forms.py index 7dd8b85..58252fa 100644 --- a/apps/map/forms.py +++ b/apps/map/forms.py @@ -17,70 +17,67 @@ 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': '', + "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': '', + "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 + mark_safe( + '%s
%s' + % (choice[1], explanatory_text[choice[0]]) + ), + ) + for choice in model_choices ] - class MinimumZoomWidget(LeafletWidget): - geometry_field_class = 'MinimumZoomField' + geometry_field_class = "MinimumZoomField" class PointOfInterest(forms.models.ModelForm): def __init__(self, *args, **kwargs): super(PointOfInterest, self).__init__(*args, **kwargs) self.helper = FormHelper(self) - self.helper.form_id = 'case-study-form' - 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-10' + self.helper.form_id = "case-study-form" + 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-10" self.helper.include_media = False - self.helper.form_action = reverse('point-of-interest-form') + self.helper.form_action = reverse("point-of-interest-form") self.helper.add_input( - Submit('submit', _('Submit'), css_class='btn-success center-block') + Submit("submit", _("Submit"), css_class="btn-success center-block") ) class Meta: model = PointOfInterest widgets = { - 'location': MinimumZoomWidget(attrs={ - 'settings_overrides': { - 'SCALE': False - } - }), + "location": MinimumZoomWidget( + attrs={"settings_overrides": {"SCALE": False}} + ) } - fields = [ - 'title', - 'location', - 'synopsis', - 'link', - ] + fields = ["title", "location", "synopsis", "link"] class BaseCaseStudyForm(forms.models.ModelForm): @@ -89,14 +86,14 @@ class BaseCaseStudyForm(forms.models.ModelForm): def __init__(self, *args, **kwargs): super(BaseCaseStudyForm, self).__init__(*args, **kwargs) self.helper = FormHelper(self) - self.helper.form_id = 'case-study-form' - self.helper.form_class = 'form-horizontal' - self.helper.form_method = 'post' - self.helper.label_class = 'col-md-3' - self.helper.field_class = 'col-md-9' + self.helper.form_id = "case-study-form" + self.helper.form_class = "form-horizontal" + self.helper.form_method = "post" + self.helper.label_class = "col-md-3" + self.helper.field_class = "col-md-9" self.helper.include_media = False - # Parse number fields correctly for the locale + #  Parse number fields correctly for the locale number_fields = [ "area_of_land", "total_generation_capacity", @@ -114,13 +111,11 @@ class BaseCaseStudyForm(forms.models.ModelForm): class Meta: model = CaseStudy - fields = '__all__' + fields = "__all__" widgets = { - 'location': MinimumZoomWidget(attrs={ - 'settings_overrides': { - 'SCALE': False - } - }), + "location": MinimumZoomWidget( + attrs={"settings_overrides": {"SCALE": False}} + ) } @@ -129,48 +124,48 @@ class ShortCaseStudyForm(BaseCaseStudyForm): def __init__(self, *args, **kwargs): super(ShortCaseStudyForm, self).__init__(*args, **kwargs) - self.helper.add_input(Submit('submit', _('Submit'), css_class='btn-success center-block')) + self.helper.add_input( + Submit("submit", _("Submit"), css_class="btn-success center-block") + ) - self.fields['sector_of_economy'].widget = forms.RadioSelect() - self.fields['sector_of_economy'].required = False - self.fields['sector_of_economy'].choices = add_explanatory_text( - CaseStudy.SECTOR_CHOICES, - SECTOR_HELP + self.fields["sector_of_economy"].widget = forms.RadioSelect() + self.fields["sector_of_economy"].required = False + self.fields["sector_of_economy"].choices = add_explanatory_text( + CaseStudy.SECTOR_CHOICES, SECTOR_HELP ) class Meta(BaseCaseStudyForm.Meta): fields = [ - 'entry_name', - 'location', - 'sector_of_economy', - 'positive_or_negative', - 'country', - 'area_of_land', - 'land_ownership', - 'land_ownership_details', - 'location_context', - 'type_of_ecosystem', - 'describe_ecosystem', - 'affected_communities', - 'project_status', - 'synopsis', - 'full_description', - 'video', - 'media_coverage_mainstream', - 'media_coverage_independent', - 'community_voices' + "entry_name", + "location", + "sector_of_economy", + "positive_or_negative", + "country", + "area_of_land", + "land_ownership", + "land_ownership_details", + "location_context", + "type_of_ecosystem", + "describe_ecosystem", + "affected_communities", + "project_status", + "synopsis", + "full_description", + "video", + "media_coverage_mainstream", + "media_coverage_independent", + "community_voices", ] class BootstrapClearableFileInput(forms.ClearableFileInput): - template_name = 'map/forms/widgets/file.html' + template_name = "map/forms/widgets/file.html" def PreviousButton(): return HTML( format_lazy( - "{prev}", - prev=_("Previous") + "{prev}", prev=_("Previous") ) ) @@ -178,8 +173,7 @@ def PreviousButton(): def NextButton(): return HTML( format_lazy( - "{next}", - next=_("Next") + "{next}", next=_("Next") ) ) @@ -189,100 +183,98 @@ class LongCaseStudyForm(BaseCaseStudyForm): images = forms.FileField( label=_("Images"), - widget=BootstrapClearableFileInput(attrs={ - 'url': reverse_lazy('files:upload'), - 'field': 'images_files', - }), - required=False + widget=BootstrapClearableFileInput( + attrs={"url": reverse_lazy("files:upload"), "field": "images_files"} + ), + required=False, ) images_files = forms.ModelMultipleChoiceField( - queryset=ImageFile.objects.all(), - widget=JSONFileListWidget(), - required=False + queryset=ImageFile.objects.all(), widget=JSONFileListWidget(), required=False ) official_project_documents = forms.FileField( label=_("Official project documents"), - widget=BootstrapClearableFileInput(attrs={ - 'url': reverse_lazy('files:upload'), - 'field': 'official_project_documents_files', - }), required=False + widget=BootstrapClearableFileInput( + attrs={ + "url": reverse_lazy("files:upload"), + "field": "official_project_documents_files", + } + ), + required=False, ) official_project_documents_files = forms.ModelMultipleChoiceField( - queryset=File.objects.all(), - widget=JSONFileListWidget(), - required=False + queryset=File.objects.all(), widget=JSONFileListWidget(), required=False ) other_documents = forms.FileField( label=_("Other documents"), - widget=BootstrapClearableFileInput(attrs={ - 'url': reverse_lazy('files:upload'), - 'field': 'other_documents_files', - }), required=False + widget=BootstrapClearableFileInput( + attrs={ + "url": reverse_lazy("files:upload"), + "field": "other_documents_files", + } + ), + required=False, ) other_documents_files = forms.ModelMultipleChoiceField( - queryset=File.objects.all(), - widget=JSONFileListWidget(), - required=False + queryset=File.objects.all(), widget=JSONFileListWidget(), required=False ) shapefiles = forms.FileField( label=CaseStudy.shapefiles_label, help_text=CaseStudy.shapefiles_help_text, - widget=BootstrapClearableFileInput(attrs={ - 'url': reverse_lazy('files:upload'), - 'field': 'shapefiles_files', - }), required=False + widget=BootstrapClearableFileInput( + attrs={"url": reverse_lazy("files:upload"), "field": "shapefiles_files"} + ), + required=False, ) shapefiles_files = forms.ModelMultipleChoiceField( - queryset=File.objects.all(), - widget=JSONFileListWidget(), - required=False + queryset=File.objects.all(), widget=JSONFileListWidget(), required=False ) coordinate_reference_system = forms.ModelChoiceField( label=_("Coordinate reference system"), queryset=SpatialRefSys.objects.all(), - widget=autocomplete.ModelSelect2(url='srs-autocomplete'), + widget=autocomplete.ModelSelect2(url="srs-autocomplete"), initial=4326, ) def __init__(self, *args, **kwargs): super(LongCaseStudyForm, self).__init__(*args, **kwargs) - self.fields['positive_case_type'].label = "" - self.fields['negative_case_reasons'].label = "" + self.fields["positive_case_type"].label = "" + self.fields["negative_case_reasons"].label = "" - self.fields['sector_of_economy'].widget = forms.RadioSelect() - self.fields['sector_of_economy'].required = False - self.fields['sector_of_economy'].choices = add_explanatory_text( - CaseStudy.SECTOR_CHOICES, - SECTOR_HELP + self.fields["sector_of_economy"].widget = forms.RadioSelect() + self.fields["sector_of_economy"].required = False + self.fields["sector_of_economy"].choices = add_explanatory_text( + CaseStudy.SECTOR_CHOICES, SECTOR_HELP ) - self.fields['power_technology'].widget = forms.RadioSelect() - self.fields['power_technology'].required = False - self.fields['power_technology'].choices = add_explanatory_text( - CaseStudy.POWER_TECHNOLOGY_CHOICES, - POWER_TECHNOLOGY_HELP + self.fields["power_technology"].widget = forms.RadioSelect() + self.fields["power_technology"].required = False + self.fields["power_technology"].choices = add_explanatory_text( + CaseStudy.POWER_TECHNOLOGY_CHOICES, POWER_TECHNOLOGY_HELP ) - self.fields['project_owners'].required = True - self.fields['shareholders'].required = True + self.fields["project_owners"].required = True + self.fields["shareholders"].required = True organising_vs_label = _( - 'Socio-environmental impacts (negative and potentially positive)') + "Socio-environmental impacts (negative and potentially positive)" + ) organising_pro_label = _( - 'Socio-environmental impacts (positive and potentially negative)') + "Socio-environmental impacts (positive and potentially negative)" + ) organising_other_label = _( - 'Socio-environmental impacts (positive and negative)') + "Socio-environmental impacts (positive and negative)" + ) - self.fields['socioeconomic_benefits'].label = format_lazy( + self.fields["socioeconomic_benefits"].label = format_lazy( ( '{vs}' '{pro}' @@ -290,33 +282,36 @@ class LongCaseStudyForm(BaseCaseStudyForm): ), vs=organising_vs_label, pro=organising_pro_label, - other=organising_other_label + other=organising_other_label, ) organising_other_text = _( - 'Please expand on your response given in the full description on page one.' - ' For example, for positive impacts you need to go beyond emissions' - ' savings, paying rent for land, or complying with environmental or social' - ' legislation. For negative impacts you need to focus on substantive' - ' impacts on vulnerable groups, violations of land rights or abusive labour' - ' practices.') + "Please expand on your response given in the full description on page one." + " For example, for positive impacts you need to go beyond emissions" + " savings, paying rent for land, or complying with environmental or social" + " legislation. For negative impacts you need to focus on substantive" + " impacts on vulnerable groups, violations of land rights or abusive labour" + " practices." + ) organising_vs_text = _( - '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. 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." + ) organising_pro_text = _( - 'Please expand on your response given in the description. Please also' - ' describe and analyze socio-environmental impacts that could be considered' - ' as negative.') + "Please expand on your response given in the description. Please also" + " describe and analyze socio-environmental impacts that could be considered" + " as negative." + ) - self.fields['socioeconomic_benefits'].help_text = format_lazy( + self.fields["socioeconomic_benefits"].help_text = format_lazy( ( '{other}' '{vs}' @@ -324,121 +319,111 @@ class LongCaseStudyForm(BaseCaseStudyForm): ), vs=organising_vs_text, pro=organising_pro_text, - other=organising_other_text + other=organising_other_text, ) - - self.helper.form_action = reverse('long-form') + self.helper.form_action = reverse("long-form") self.helper.layout = Layout( TabHolder( - Tab(_("Basic information"), - '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', - 'affected_communities', - 'people_affected_other', - 'project_status', - 'start_year', - 'completion_year', - 'synopsis', - 'full_description', - 'images', - 'images_files', - 'video', - 'video_caption', - 'video_credit', + Tab( + _("Basic information"), + "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", + "affected_communities", + "people_affected_other", + "project_status", + "start_year", + "completion_year", + "synopsis", + "full_description", + "images", + "images_files", + "video", + "video_caption", + "video_credit", Fieldset( _("Owners and financiers"), - 'project_owners', - 'consultants_contractors', - 'shareholders', - 'financial_institutions', - 'financial_institutions_other', + "project_owners", + "consultants_contractors", + "shareholders", + "financial_institutions", + "financial_institutions_other", ), Fieldset( _("Media reports and other communications"), - 'media_coverage_mainstream', - 'media_coverage_independent', - 'community_voices', - 'direct_comms', - 'social_media_links' + "media_coverage_mainstream", + "media_coverage_independent", + "community_voices", + "direct_comms", + "social_media_links", ), - FormActions( - NextButton() - ) + FormActions(NextButton()), ), Tab( _("Technical and economic analysis"), - 'sector_of_economy', + "sector_of_economy", Div( - 'generation_type', - 'generation_technology', - css_class='power_generation_questions' + "generation_type", + "generation_technology", + css_class="power_generation_questions", + ), + Div("power_technology", css_class="energy_network_questions"), + Div( + "energy_details", + css_class="energy_generation_network_and_storage_questions", ), Div( - 'power_technology', - css_class='energy_network_questions' + "biomass_detail", + "total_generation_capacity", + css_class="power_generation_questions", ), Div( - 'energy_details', - css_class='energy_generation_network_and_storage_questions' + "energy_transmission_capacity", + css_class="energy_network_questions", ), Div( - 'biomass_detail', - 'total_generation_capacity', - css_class='power_generation_questions' + "energy_storage_capacity", css_class="energy_storage_questions" ), Div( - 'energy_transmission_capacity', - css_class='energy_network_questions' + PrependedText("total_investment", "USD $"), + "contractor_or_supplier_of_technology", + "energy_customers", + "additional_technical_details", + css_class="energy_generation_network_and_storage_questions", ), Div( - 'energy_storage_capacity', - css_class='energy_storage_questions' + "minerals_or_commodities", + "minerals_or_commodities_other", + "use_in_energy_economy", + "use_in_energy_economy_other", + "project_life_span", + "size_of_concessions", + "projected_production_of_commodities", + "type_of_extraction", + "associated_infrastructure", + css_class="mineral_commodity_questions", ), Div( - PrependedText('total_investment', 'USD $'), - 'contractor_or_supplier_of_technology', - 'energy_customers', - 'additional_technical_details', - css_class='energy_generation_network_and_storage_questions' + "manufacturing_type", + "manufacturing_description", + "manufacturing_related_tech", + "manufacturing_factors", + "manufacturing_factors_description", + "manufacturing_ownership", + css_class="manufacturing_questions", ), - - Div( - 'minerals_or_commodities', - 'minerals_or_commodities_other', - 'use_in_energy_economy', - 'use_in_energy_economy_other', - 'project_life_span', - 'size_of_concessions', - 'projected_production_of_commodities', - 'type_of_extraction', - 'associated_infrastructure', - 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( - PreviousButton(), - NextButton() - ) + FormActions(PreviousButton(), NextButton()), ), Tab( _("Socio-environmental analysis"), @@ -448,74 +433,69 @@ class LongCaseStudyForm(BaseCaseStudyForm): text=_( "In the following, we expect the analysis to reflect" " the perspective of the organization(s) or person(s)" - " describing the case.") - ) + " describing the case." + ), + ) ), - 'positive_or_negative', + "positive_or_negative", Div( HTML( format_lazy( "", - text=_("What kind of case is this entry about?") + text=_("What kind of case is this entry about?"), ) ), Div( - 'positive_case_type', - 'negative_case_reasons', - css_class='col-md-9', + "positive_case_type", + "negative_case_reasons", + css_class="col-md-9", ), - css_class='form-group', + 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', - Div( - css_class="common_questions" - ), - FormActions( - PreviousButton(), - NextButton() - ) + "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", + Div(css_class="common_questions"), + FormActions(PreviousButton(), NextButton()), ), Tab( _("Contact details"), - 'contact_email', - 'contact_phone', - 'contact_website', - PrependedText('contact_twitter', '@', placeholder='username'), - 'contact_facebook', - 'contact_other', - 'shown_on_other_platforms', - 'shown_on_other_platforms_detail', - FormActions( - PreviousButton(), - NextButton() - ) + "contact_email", + "contact_phone", + "contact_website", + PrependedText("contact_twitter", "@", placeholder="username"), + "contact_facebook", + "contact_other", + "shown_on_other_platforms", + "shown_on_other_platforms_detail", + FormActions(PreviousButton(), NextButton()), ), Tab( _("Uploads"), - 'official_project_documents', - 'official_project_documents_files', - 'other_documents', - 'other_documents_files', + "official_project_documents", + "official_project_documents_files", + "other_documents", + "other_documents_files", FormActions( PreviousButton(), - Submit('submit', _('Submit'), css_class="btn-success pull-right") - ) - ))) + Submit( + "submit", _("Submit"), css_class="btn-success pull-right" + ), + ), + ), + ) + ) class Meta(BaseCaseStudyForm.Meta): - exclude = ('approved',) + exclude = ("approved",) class Media: - js = ( - 'files/upload.js', - ) + js = ("files/upload.js",) diff --git a/apps/map/migrations/0001_initial.py b/apps/map/migrations/0001_initial.py index 63fd493..d91e1e8 100644 --- a/apps/map/migrations/0001_initial.py +++ b/apps/map/migrations/0001_initial.py @@ -13,35 +13,60 @@ class Migration(migrations.Migration): initial = True - dependencies = [ - migrations.swappable_dependency(settings.AUTH_USER_MODEL), - ] + dependencies = [migrations.swappable_dependency(settings.AUTH_USER_MODEL)] operations = [ migrations.CreateModel( - name='CaseStudy', + name="CaseStudy", fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('location', django.contrib.gis.db.models.fields.PointField(srid=4326)), - ('project_name', models.CharField(max_length=128)), - ('supply_chain', models.CharField(choices=[('A', 'Option A'), ('B', 'Option B')], max_length=1)), - ('generation_type', models.CharField(choices=[('W', 'Wind'), ('S', 'Solar')], max_length=1)), - ('associated_companies', models.CharField(max_length=128)), - ('financiers', models.CharField(max_length=128)), - ('important_lenders', models.CharField(max_length=128)), - ('country', django_countries.fields.CountryField(max_length=2)), - ('affects_indigenous', models.BooleanField()), - ('affects_indigenous_reason', models.TextField()), - ('proposed_start', models.DateField()), - ('proposed_completion', models.DateField()), - ('description', models.TextField()), - ('link_to_forum', models.URLField()), - ('image', models.ImageField(upload_to='')), - ('references', models.TextField()), - ('commodities', models.CharField(max_length=128)), - ('like_to_engage_developer', models.BooleanField()), - ('like_to_engage_investors', models.BooleanField()), - ('author', models.ForeignKey(blank=True, editable=False, null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL)), + ( + "id", + models.AutoField( + auto_created=True, + primary_key=True, + serialize=False, + verbose_name="ID", + ), + ), + ("location", django.contrib.gis.db.models.fields.PointField(srid=4326)), + ("project_name", models.CharField(max_length=128)), + ( + "supply_chain", + models.CharField( + choices=[("A", "Option A"), ("B", "Option B")], max_length=1 + ), + ), + ( + "generation_type", + models.CharField( + choices=[("W", "Wind"), ("S", "Solar")], max_length=1 + ), + ), + ("associated_companies", models.CharField(max_length=128)), + ("financiers", models.CharField(max_length=128)), + ("important_lenders", models.CharField(max_length=128)), + ("country", django_countries.fields.CountryField(max_length=2)), + ("affects_indigenous", models.BooleanField()), + ("affects_indigenous_reason", models.TextField()), + ("proposed_start", models.DateField()), + ("proposed_completion", models.DateField()), + ("description", models.TextField()), + ("link_to_forum", models.URLField()), + ("image", models.ImageField(upload_to="")), + ("references", models.TextField()), + ("commodities", models.CharField(max_length=128)), + ("like_to_engage_developer", models.BooleanField()), + ("like_to_engage_investors", models.BooleanField()), + ( + "author", + models.ForeignKey( + blank=True, + editable=False, + null=True, + on_delete=django.db.models.deletion.SET_NULL, + to=settings.AUTH_USER_MODEL, + ), + ), ], - ), + ) ] diff --git a/apps/map/migrations/0002_auto_20170520_0139.py b/apps/map/migrations/0002_auto_20170520_0139.py index 446bc62..c687b0c 100644 --- a/apps/map/migrations/0002_auto_20170520_0139.py +++ b/apps/map/migrations/0002_auto_20170520_0139.py @@ -7,14 +7,10 @@ from django.db import migrations class Migration(migrations.Migration): - dependencies = [ - ('map', '0001_initial'), - ] + dependencies = [("map", "0001_initial")] operations = [ migrations.RenameField( - model_name='casestudy', - old_name='location', - new_name='geom', - ), + model_name="casestudy", old_name="location", new_name="geom" + ) ] diff --git a/apps/map/migrations/0003_auto_20170521_0643.py b/apps/map/migrations/0003_auto_20170521_0643.py index 2e2d37a..376c5b0 100644 --- a/apps/map/migrations/0003_auto_20170521_0643.py +++ b/apps/map/migrations/0003_auto_20170521_0643.py @@ -7,14 +7,10 @@ from django.db import migrations class Migration(migrations.Migration): - dependencies = [ - ('map', '0002_auto_20170520_0139'), - ] + dependencies = [("map", "0002_auto_20170520_0139")] operations = [ migrations.RenameField( - model_name='casestudy', - old_name='geom', - new_name='location', - ), + model_name="casestudy", old_name="geom", new_name="location" + ) ] diff --git a/apps/map/migrations/0004_auto_20171006_1559.py b/apps/map/migrations/0004_auto_20171006_1559.py index ed4188c..7b66458 100644 --- a/apps/map/migrations/0004_auto_20171006_1559.py +++ b/apps/map/migrations/0004_auto_20171006_1559.py @@ -7,163 +7,210 @@ from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [ - ('map', '0003_auto_20170521_0643'), - ] + dependencies = [("map", "0003_auto_20170521_0643")] operations = [ + migrations.RemoveField(model_name="casestudy", name="affects_indigenous"), migrations.RemoveField( - model_name='casestudy', - name='affects_indigenous', - ), - migrations.RemoveField( - model_name='casestudy', - name='affects_indigenous_reason', - ), - migrations.RemoveField( - model_name='casestudy', - name='associated_companies', - ), - migrations.RemoveField( - model_name='casestudy', - name='commodities', - ), - migrations.RemoveField( - model_name='casestudy', - name='description', - ), - migrations.RemoveField( - model_name='casestudy', - name='financiers', - ), - migrations.RemoveField( - model_name='casestudy', - name='generation_type', - ), - migrations.RemoveField( - model_name='casestudy', - name='important_lenders', - ), - migrations.RemoveField( - model_name='casestudy', - name='like_to_engage_developer', - ), - migrations.RemoveField( - model_name='casestudy', - name='like_to_engage_investors', - ), - migrations.RemoveField( - model_name='casestudy', - name='link_to_forum', - ), - migrations.RemoveField( - model_name='casestudy', - name='project_name', - ), - migrations.RemoveField( - model_name='casestudy', - name='proposed_completion', - ), - migrations.RemoveField( - model_name='casestudy', - name='proposed_start', - ), - migrations.RemoveField( - model_name='casestudy', - name='references', - ), - migrations.RemoveField( - model_name='casestudy', - name='supply_chain', + model_name="casestudy", name="affects_indigenous_reason" ), + migrations.RemoveField(model_name="casestudy", name="associated_companies"), + migrations.RemoveField(model_name="casestudy", name="commodities"), + migrations.RemoveField(model_name="casestudy", name="description"), + migrations.RemoveField(model_name="casestudy", name="financiers"), + migrations.RemoveField(model_name="casestudy", name="generation_type"), + migrations.RemoveField(model_name="casestudy", name="important_lenders"), + migrations.RemoveField(model_name="casestudy", name="like_to_engage_developer"), + migrations.RemoveField(model_name="casestudy", name="like_to_engage_investors"), + migrations.RemoveField(model_name="casestudy", name="link_to_forum"), + migrations.RemoveField(model_name="casestudy", name="project_name"), + migrations.RemoveField(model_name="casestudy", name="proposed_completion"), + migrations.RemoveField(model_name="casestudy", name="proposed_start"), + migrations.RemoveField(model_name="casestudy", name="references"), + migrations.RemoveField(model_name="casestudy", name="supply_chain"), migrations.AddField( - model_name='casestudy', - name='Affects Indigenous - Details', - field=models.CharField(default='', help_text='What group of indigenous people does the community belong to?', max_length=256), + model_name="casestudy", + name="Affects Indigenous - Details", + field=models.CharField( + default="", + help_text="What group of indigenous people does the community belong to?", + max_length=256, + ), preserve_default=False, ), migrations.AddField( - model_name='casestudy', - name='Affects indigenous people?', - field=models.BooleanField(default=False, help_text='Does the project affect indigenous people?'), + model_name="casestudy", + name="Affects indigenous people?", + field=models.BooleanField( + default=False, help_text="Does the project affect indigenous people?" + ), preserve_default=False, ), migrations.AddField( - model_name='casestudy', - name='Approximate land area', - field=models.IntegerField(default=0, help_text='The area of land covered by the project (in km²)'), + model_name="casestudy", + name="Approximate land area", + field=models.IntegerField( + default=0, help_text="The area of land covered by the project (in km²)" + ), preserve_default=False, ), migrations.AddField( - model_name='casestudy', - name='Community Voices', - field=models.TextField(default='', help_text='Add any direct quotes from members of the community that relate to this project'), + model_name="casestudy", + name="Community Voices", + field=models.TextField( + default="", + help_text="Add any direct quotes from members of the community that relate to this project", + ), preserve_default=False, ), migrations.AddField( - model_name='casestudy', - name='Describe the ecosystem', - field=models.CharField(default='', help_text='In your own words, add more detail about the ecosystem.', max_length=256), + model_name="casestudy", + name="Describe the ecosystem", + field=models.CharField( + default="", + help_text="In your own words, add more detail about the ecosystem.", + max_length=256, + ), preserve_default=False, ), migrations.AddField( - model_name='casestudy', - name='Entry Name', - field=models.CharField(default='', help_text='Enter the name of the entry. This should usually be the name of project.', max_length=128), + model_name="casestudy", + name="Entry Name", + field=models.CharField( + default="", + help_text="Enter the name of the entry. This should usually be the name of project.", + max_length=128, + ), preserve_default=False, ), migrations.AddField( - model_name='casestudy', - name='Full Description', - field=models.TextField(default='', help_text='Describe the project in full. Separate paragraphs with a new line Please add as much detail as you feel is necessary here.'), + model_name="casestudy", + name="Full Description", + field=models.TextField( + default="", + help_text="Describe the project in full. Separate paragraphs with a new line Please add as much detail as you feel is necessary here.", + ), preserve_default=False, ), migrations.AddField( - model_name='casestudy', - name='Land ownership', - field=models.CharField(choices=[('PRI', 'Private Land'), ('PUB', 'Public Land'), ('COM', 'Community Land'), ('OTH', 'Other')], default='', help_text='What type of ownership does the land fall under?', max_length=3), + model_name="casestudy", + name="Land ownership", + field=models.CharField( + choices=[ + ("PRI", "Private Land"), + ("PUB", "Public Land"), + ("COM", "Community Land"), + ("OTH", "Other"), + ], + default="", + help_text="What type of ownership does the land fall under?", + max_length=3, + ), preserve_default=False, ), migrations.AddField( - model_name='casestudy', - name='Land ownership details', - field=models.CharField(default='', help_text='Add any details and other remarks about the land ownership', max_length=256), + model_name="casestudy", + name="Land ownership details", + field=models.CharField( + default="", + help_text="Add any details and other remarks about the land ownership", + max_length=256, + ), preserve_default=False, ), migrations.AddField( - model_name='casestudy', - name='Location', - field=models.CharField(choices=[('RUR', 'Rural'), ('URB', 'Urban')], default=None, help_text='Select the context that is most applicable to this case study.', max_length=1), + model_name="casestudy", + name="Location", + field=models.CharField( + choices=[("RUR", "Rural"), ("URB", "Urban")], + default=None, + help_text="Select the context that is most applicable to this case study.", + max_length=1, + ), preserve_default=False, ), migrations.AddField( - model_name='casestudy', - name='Positive or negative?', - field=models.CharField(choices=[('POS', 'Positive'), ('NEG', 'Negative')], default=None, help_text='Is the case study a positive case or a negative case?', max_length=1), + model_name="casestudy", + name="Positive or negative?", + field=models.CharField( + choices=[("POS", "Positive"), ("NEG", "Negative")], + default=None, + help_text="Is the case study a positive case or a negative case?", + max_length=1, + ), preserve_default=False, ), migrations.AddField( - model_name='casestudy', - name='Sector of economy', - field=models.CharField(choices=[('Renewable Energy Generation', (('WND', 'Wind'), ('SOL', 'Solar'), ('HYD', 'Hydro'))), ('PG', 'Power Grids'), ('SM', 'Supply of Minerals')], default=None, help_text='Which sector of the renewable energy economy is most relevant?', max_length=2), + model_name="casestudy", + name="Sector of economy", + field=models.CharField( + choices=[ + ( + "Renewable Energy Generation", + (("WND", "Wind"), ("SOL", "Solar"), ("HYD", "Hydro")), + ), + ("PG", "Power Grids"), + ("SM", "Supply of Minerals"), + ], + default=None, + help_text="Which sector of the renewable energy economy is most relevant?", + max_length=2, + ), preserve_default=False, ), migrations.AddField( - model_name='casestudy', - name='Status of Project', - field=models.CharField(choices=[('EXSTNG', 'Existing Project'), ('UCONST', 'Under Construction'), ('PROJCD', 'Projected Project')], default=None, help_text='What is the status of the current project?', max_length=6), + model_name="casestudy", + name="Status of Project", + field=models.CharField( + choices=[ + ("EXSTNG", "Existing Project"), + ("UCONST", "Under Construction"), + ("PROJCD", "Projected Project"), + ], + default=None, + help_text="What is the status of the current project?", + max_length=6, + ), preserve_default=False, ), migrations.AddField( - model_name='casestudy', - name='Synopsis', - field=models.TextField(default=None, help_text='Briefly describe the project. This will be displayed at the top of the case study page. Maximum 500 chars (about 3½ tweets)', max_length=500), + model_name="casestudy", + name="Synopsis", + field=models.TextField( + default=None, + help_text="Briefly describe the project. This will be displayed at the top of the case study page. Maximum 500 chars (about 3½ tweets)", + max_length=500, + ), preserve_default=False, ), migrations.AddField( - model_name='casestudy', - name='Type of ecosystem', - field=models.CharField(choices=[('Water Based', (('MARINE', 'Marine (e.g. Ocean, Sea)'), ('FRESH', 'Freshwater (e.g. Freshwater, Lake)'))), ('Land Based', (('FOREST', 'Forest/Jungle'), ('AGRI', 'Agricultural Land'), ('GRASS', 'Grassland'), ('DESERT', 'Desert (Tundra, Ice or Sand)'), ('WETLND', 'Wetland (Marsh, Mangrove, Peat Soil)'), ('URBAN', 'Urban')))], default=None, help_text='Select the most relevant type of ecosystem.', max_length=6), + model_name="casestudy", + name="Type of ecosystem", + field=models.CharField( + choices=[ + ( + "Water Based", + ( + ("MARINE", "Marine (e.g. Ocean, Sea)"), + ("FRESH", "Freshwater (e.g. Freshwater, Lake)"), + ), + ), + ( + "Land Based", + ( + ("FOREST", "Forest/Jungle"), + ("AGRI", "Agricultural Land"), + ("GRASS", "Grassland"), + ("DESERT", "Desert (Tundra, Ice or Sand)"), + ("WETLND", "Wetland (Marsh, Mangrove, Peat Soil)"), + ("URBAN", "Urban"), + ), + ), + ], + default=None, + help_text="Select the most relevant type of ecosystem.", + max_length=6, + ), preserve_default=False, ), ] diff --git a/apps/map/migrations/0005_auto_20171006_2033.py b/apps/map/migrations/0005_auto_20171006_2033.py index bd4f85c..b5c442a 100644 --- a/apps/map/migrations/0005_auto_20171006_2033.py +++ b/apps/map/migrations/0005_auto_20171006_2033.py @@ -7,159 +7,228 @@ from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [ - ('map', '0004_auto_20171006_1559'), - ] + dependencies = [("map", "0004_auto_20171006_1559")] operations = [ migrations.RemoveField( - model_name='casestudy', - name='Affects Indigenous - Details', + model_name="casestudy", name="Affects Indigenous - Details" ), migrations.RemoveField( - model_name='casestudy', - name='Affects indigenous people?', - ), - migrations.RemoveField( - model_name='casestudy', - name='Approximate land area', - ), - migrations.RemoveField( - model_name='casestudy', - name='Community Voices', - ), - migrations.RemoveField( - model_name='casestudy', - name='Describe the ecosystem', - ), - migrations.RemoveField( - model_name='casestudy', - name='Entry Name', - ), - migrations.RemoveField( - model_name='casestudy', - name='Full Description', - ), - migrations.RemoveField( - model_name='casestudy', - name='Land ownership', - ), - migrations.RemoveField( - model_name='casestudy', - name='Land ownership details', - ), - migrations.RemoveField( - model_name='casestudy', - name='Location', - ), - migrations.RemoveField( - model_name='casestudy', - name='Positive or negative?', - ), - migrations.RemoveField( - model_name='casestudy', - name='Sector of economy', - ), - migrations.RemoveField( - model_name='casestudy', - name='Status of Project', - ), - migrations.RemoveField( - model_name='casestudy', - name='Synopsis', - ), - migrations.RemoveField( - model_name='casestudy', - name='Type of ecosystem', + model_name="casestudy", name="Affects indigenous people?" ), + migrations.RemoveField(model_name="casestudy", name="Approximate land area"), + migrations.RemoveField(model_name="casestudy", name="Community Voices"), + migrations.RemoveField(model_name="casestudy", name="Describe the ecosystem"), + migrations.RemoveField(model_name="casestudy", name="Entry Name"), + migrations.RemoveField(model_name="casestudy", name="Full Description"), + migrations.RemoveField(model_name="casestudy", name="Land ownership"), + migrations.RemoveField(model_name="casestudy", name="Land ownership details"), + migrations.RemoveField(model_name="casestudy", name="Location"), + migrations.RemoveField(model_name="casestudy", name="Positive or negative?"), + migrations.RemoveField(model_name="casestudy", name="Sector of economy"), + migrations.RemoveField(model_name="casestudy", name="Status of Project"), + migrations.RemoveField(model_name="casestudy", name="Synopsis"), + migrations.RemoveField(model_name="casestudy", name="Type of ecosystem"), migrations.AddField( - model_name='casestudy', - name='affects_indigenous', - field=models.BooleanField(default=None, help_text='Does the project affect indigenous people?', verbose_name='Affects indigenous people?'), + model_name="casestudy", + name="affects_indigenous", + field=models.BooleanField( + default=None, + help_text="Does the project affect indigenous people?", + verbose_name="Affects indigenous people?", + ), preserve_default=False, ), migrations.AddField( - model_name='casestudy', - name='affects_indigenous_detail', - field=models.CharField(default=None, help_text='What group of indigenous people does the community belong to?', max_length=256, verbose_name='Affects Indigenous - Details'), + model_name="casestudy", + name="affects_indigenous_detail", + field=models.CharField( + default=None, + help_text="What group of indigenous people does the community belong to?", + max_length=256, + verbose_name="Affects Indigenous - Details", + ), preserve_default=False, ), migrations.AddField( - model_name='casestudy', - name='area_of_land', - field=models.IntegerField(default=None, help_text='The area of land covered by the project (in km²)', verbose_name='Approximate land area'), + model_name="casestudy", + name="area_of_land", + field=models.IntegerField( + default=None, + help_text="The area of land covered by the project (in km²)", + verbose_name="Approximate land area", + ), preserve_default=False, ), migrations.AddField( - model_name='casestudy', - name='community_voices', - field=models.TextField(default=None, help_text='Add any direct quotes from members of the community that relate to this project', verbose_name='Community Voices'), + model_name="casestudy", + name="community_voices", + field=models.TextField( + default=None, + help_text="Add any direct quotes from members of the community that relate to this project", + verbose_name="Community Voices", + ), preserve_default=False, ), migrations.AddField( - model_name='casestudy', - name='describe_ecosystem', - field=models.CharField(default=None, help_text='In your own words, add more detail about the ecosystem.', max_length=256, verbose_name='Describe the ecosystem'), + model_name="casestudy", + name="describe_ecosystem", + field=models.CharField( + default=None, + help_text="In your own words, add more detail about the ecosystem.", + max_length=256, + verbose_name="Describe the ecosystem", + ), preserve_default=False, ), migrations.AddField( - model_name='casestudy', - name='entry_name', - field=models.CharField(default=None, help_text='Enter the name of the entry. This should usually be the name of project.', max_length=128, verbose_name='Entry Name'), + model_name="casestudy", + name="entry_name", + field=models.CharField( + default=None, + help_text="Enter the name of the entry. This should usually be the name of project.", + max_length=128, + verbose_name="Entry Name", + ), preserve_default=False, ), migrations.AddField( - model_name='casestudy', - name='full_description', - field=models.TextField(default=None, help_text='Describe the project in full. Separate paragraphs with a new line Please add as much detail as you feel is necessary here.', verbose_name='Full Description'), + model_name="casestudy", + name="full_description", + field=models.TextField( + default=None, + help_text="Describe the project in full. Separate paragraphs with a new line Please add as much detail as you feel is necessary here.", + verbose_name="Full Description", + ), preserve_default=False, ), migrations.AddField( - model_name='casestudy', - name='land_ownership', - field=models.CharField(choices=[('PRI', 'Private Land'), ('PUB', 'Public Land'), ('COM', 'Community Land'), ('OTH', 'Other')], default=None, help_text='What type of ownership does the land fall under?', max_length=3, verbose_name='Land ownership'), + model_name="casestudy", + name="land_ownership", + field=models.CharField( + choices=[ + ("PRI", "Private Land"), + ("PUB", "Public Land"), + ("COM", "Community Land"), + ("OTH", "Other"), + ], + default=None, + help_text="What type of ownership does the land fall under?", + max_length=3, + verbose_name="Land ownership", + ), preserve_default=False, ), migrations.AddField( - model_name='casestudy', - name='land_ownership_details', - field=models.CharField(default=None, help_text='Add any details and other remarks about the land ownership', max_length=256, verbose_name='Land ownership details'), + model_name="casestudy", + name="land_ownership_details", + field=models.CharField( + default=None, + help_text="Add any details and other remarks about the land ownership", + max_length=256, + verbose_name="Land ownership details", + ), preserve_default=False, ), migrations.AddField( - model_name='casestudy', - name='location_context', - field=models.CharField(choices=[('RUR', 'Rural'), ('URB', 'Urban')], default=None, help_text='Select the context that is most applicable to this case study.', max_length=1, verbose_name='Location'), + model_name="casestudy", + name="location_context", + field=models.CharField( + choices=[("RUR", "Rural"), ("URB", "Urban")], + default=None, + help_text="Select the context that is most applicable to this case study.", + max_length=1, + verbose_name="Location", + ), preserve_default=False, ), migrations.AddField( - model_name='casestudy', - name='positive_or_negative', - field=models.CharField(choices=[('POS', 'Positive'), ('NEG', 'Negative')], default=None, help_text='Is the case study a positive case or a negative case?', max_length=1, verbose_name='Positive or negative?'), + model_name="casestudy", + name="positive_or_negative", + field=models.CharField( + choices=[("POS", "Positive"), ("NEG", "Negative")], + default=None, + help_text="Is the case study a positive case or a negative case?", + max_length=1, + verbose_name="Positive or negative?", + ), preserve_default=False, ), migrations.AddField( - model_name='casestudy', - name='project_status', - field=models.CharField(choices=[('EXSTNG', 'Existing Project'), ('UCONST', 'Under Construction'), ('PROJCD', 'Projected Project')], default=None, help_text='What is the status of the current project?', max_length=6, verbose_name='Status of Project'), + model_name="casestudy", + name="project_status", + field=models.CharField( + choices=[ + ("EXSTNG", "Existing Project"), + ("UCONST", "Under Construction"), + ("PROJCD", "Projected Project"), + ], + default=None, + help_text="What is the status of the current project?", + max_length=6, + verbose_name="Status of Project", + ), preserve_default=False, ), migrations.AddField( - model_name='casestudy', - name='sector_of_economy', - field=models.CharField(choices=[('Renewable Energy Generation', (('WND', 'Wind'), ('SOL', 'Solar'), ('HYD', 'Hydro'))), ('PG', 'Power Grids'), ('SM', 'Supply of Minerals')], default=None, help_text='Which sector of the renewable energy economy is most relevant?', max_length=2, verbose_name='Sector of economy'), + model_name="casestudy", + name="sector_of_economy", + field=models.CharField( + choices=[ + ( + "Renewable Energy Generation", + (("WND", "Wind"), ("SOL", "Solar"), ("HYD", "Hydro")), + ), + ("PG", "Power Grids"), + ("SM", "Supply of Minerals"), + ], + default=None, + help_text="Which sector of the renewable energy economy is most relevant?", + max_length=2, + verbose_name="Sector of economy", + ), preserve_default=False, ), migrations.AddField( - model_name='casestudy', - name='synopsis', - field=models.TextField(default=None, help_text='Briefly describe the project. This will be displayed at the top of the case study page. Maximum 500 chars (about 3½ tweets)', max_length=500, verbose_name='Synopsis'), + model_name="casestudy", + name="synopsis", + field=models.TextField( + default=None, + help_text="Briefly describe the project. This will be displayed at the top of the case study page. Maximum 500 chars (about 3½ tweets)", + max_length=500, + verbose_name="Synopsis", + ), preserve_default=False, ), migrations.AddField( - model_name='casestudy', - name='type_of_ecosystem', - field=models.CharField(choices=[('Water Based', (('MARINE', 'Marine (e.g. Ocean, Sea)'), ('FRESH', 'Freshwater (e.g. Freshwater, Lake)'))), ('Land Based', (('FOREST', 'Forest/Jungle'), ('AGRI', 'Agricultural Land'), ('GRASS', 'Grassland'), ('DESERT', 'Desert (Tundra, Ice or Sand)'), ('WETLND', 'Wetland (Marsh, Mangrove, Peat Soil)'), ('URBAN', 'Urban')))], default=None, help_text='Select the most relevant type of ecosystem.', max_length=6, verbose_name='Type of ecosystem'), + model_name="casestudy", + name="type_of_ecosystem", + field=models.CharField( + choices=[ + ( + "Water Based", + ( + ("MARINE", "Marine (e.g. Ocean, Sea)"), + ("FRESH", "Freshwater (e.g. Freshwater, Lake)"), + ), + ), + ( + "Land Based", + ( + ("FOREST", "Forest/Jungle"), + ("AGRI", "Agricultural Land"), + ("GRASS", "Grassland"), + ("DESERT", "Desert (Tundra, Ice or Sand)"), + ("WETLND", "Wetland (Marsh, Mangrove, Peat Soil)"), + ("URBAN", "Urban"), + ), + ), + ], + default=None, + help_text="Select the most relevant type of ecosystem.", + max_length=6, + verbose_name="Type of ecosystem", + ), preserve_default=False, ), ] diff --git a/apps/map/migrations/0006_auto_20171007_1349.py b/apps/map/migrations/0006_auto_20171007_1349.py index 74a1e89..1c745b1 100644 --- a/apps/map/migrations/0006_auto_20171007_1349.py +++ b/apps/map/migrations/0006_auto_20171007_1349.py @@ -7,24 +7,44 @@ from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [ - ('map', '0005_auto_20171006_2033'), - ] + dependencies = [("map", "0005_auto_20171006_2033")] operations = [ migrations.AlterField( - model_name='casestudy', - name='location_context', - field=models.CharField(choices=[('RUR', 'Rural'), ('URB', 'Urban')], help_text='Select the context that is most applicable to this case study.', max_length=3, verbose_name='Location'), + model_name="casestudy", + name="location_context", + field=models.CharField( + choices=[("RUR", "Rural"), ("URB", "Urban")], + 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='positive_or_negative', - field=models.CharField(choices=[('P', 'Positive'), ('N', 'Negative')], help_text='Is the case study a positive case or a negative case?', max_length=1, verbose_name='Positive or negative?'), + model_name="casestudy", + name="positive_or_negative", + field=models.CharField( + choices=[("P", "Positive"), ("N", "Negative")], + help_text="Is the case study a positive case or a negative case?", + max_length=1, + verbose_name="Positive or negative?", + ), ), migrations.AlterField( - model_name='casestudy', - name='sector_of_economy', - field=models.CharField(choices=[('Renewable Energy Generation', (('WND', 'Wind'), ('SOL', 'Solar'), ('HYD', 'Hydro'))), ('PG', 'Power Grids'), ('SM', 'Supply of Minerals')], help_text='Which sector of the renewable energy economy is most relevant?', max_length=3, verbose_name='Sector of economy'), + model_name="casestudy", + name="sector_of_economy", + field=models.CharField( + choices=[ + ( + "Renewable Energy Generation", + (("WND", "Wind"), ("SOL", "Solar"), ("HYD", "Hydro")), + ), + ("PG", "Power Grids"), + ("SM", "Supply of Minerals"), + ], + help_text="Which sector of the renewable energy economy is most relevant?", + max_length=3, + verbose_name="Sector of economy", + ), ), ] diff --git a/apps/map/migrations/0007_casestudy_slug.py b/apps/map/migrations/0007_casestudy_slug.py index 9c6d5f9..b362b0a 100644 --- a/apps/map/migrations/0007_casestudy_slug.py +++ b/apps/map/migrations/0007_casestudy_slug.py @@ -8,14 +8,14 @@ import django_extensions.db.fields class Migration(migrations.Migration): - dependencies = [ - ('map', '0006_auto_20171007_1349'), - ] + dependencies = [("map", "0006_auto_20171007_1349")] operations = [ migrations.AddField( - model_name='casestudy', - name='slug', - field=django_extensions.db.fields.AutoSlugField(blank=True, editable=False, populate_from=['entry_name']), - ), + model_name="casestudy", + name="slug", + field=django_extensions.db.fields.AutoSlugField( + blank=True, editable=False, populate_from=["entry_name"] + ), + ) ] diff --git a/apps/map/migrations/0008_casestudy_date_created.py b/apps/map/migrations/0008_casestudy_date_created.py index 8f80d42..2653c8d 100644 --- a/apps/map/migrations/0008_casestudy_date_created.py +++ b/apps/map/migrations/0008_casestudy_date_created.py @@ -7,14 +7,12 @@ from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [ - ('map', '0007_casestudy_slug'), - ] + dependencies = [("map", "0007_casestudy_slug")] operations = [ migrations.AddField( - model_name='casestudy', - name='date_created', + model_name="casestudy", + name="date_created", field=models.DateTimeField(auto_now=True), - ), + ) ] diff --git a/apps/map/migrations/0009_auto_20171007_1544.py b/apps/map/migrations/0009_auto_20171007_1544.py index aad5d57..324dd54 100644 --- a/apps/map/migrations/0009_auto_20171007_1544.py +++ b/apps/map/migrations/0009_auto_20171007_1544.py @@ -7,20 +7,18 @@ from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [ - ('map', '0008_casestudy_date_created'), - ] + dependencies = [("map", "0008_casestudy_date_created")] operations = [ migrations.AddField( - model_name='casestudy', - name='video', - field=models.URLField(default="", max_length=43, verbose_name='Video'), + model_name="casestudy", + name="video", + field=models.URLField(default="", max_length=43, verbose_name="Video"), preserve_default=False, ), migrations.AlterField( - model_name='casestudy', - name='image', - field=models.ImageField(upload_to='', verbose_name='Image'), + model_name="casestudy", + name="image", + field=models.ImageField(upload_to="", verbose_name="Image"), ), ] diff --git a/apps/map/migrations/0010_auto_20171011_1606.py b/apps/map/migrations/0010_auto_20171011_1606.py index 4620864..14e5430 100644 --- a/apps/map/migrations/0010_auto_20171011_1606.py +++ b/apps/map/migrations/0010_auto_20171011_1606.py @@ -8,104 +8,358 @@ from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [ - ('map', '0009_auto_20171007_1544'), - ] + dependencies = [("map", "0009_auto_20171007_1544")] operations = [ migrations.AddField( - model_name='casestudy', - name='completion_year', - field=models.IntegerField(blank=True, choices=[(1977, 1977), (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)], default=None, help_text="Select the year the project was completed. If the project hasn't finished, select the projected completion year.", null=True, verbose_name='Completion year'), + model_name="casestudy", + name="completion_year", + field=models.IntegerField( + blank=True, + choices=[ + (1977, 1977), + (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), + ], + default=None, + help_text="Select the year the project was completed. If the project hasn't finished, select the projected completion year.", + null=True, + verbose_name="Completion year", + ), ), migrations.AddField( - model_name='casestudy', - name='direct_comms', - field=models.TextField(default=None, help_text='Add any reports of direct communication between community members and representatives of developers/companies/investors.', max_length=500, null=True, verbose_name='Reports of direct communications'), + model_name="casestudy", + name="direct_comms", + field=models.TextField( + default=None, + help_text="Add any reports of direct communication between community members and representatives of developers/companies/investors.", + max_length=500, + null=True, + verbose_name="Reports of direct communications", + ), ), migrations.AddField( - model_name='casestudy', - name='energy_customers', - field=models.CharField(blank=True, default=None, help_text="List any wholesale energy customers that take energy from the development. E.g. 'national grids' or private energy suppliers.", max_length=120, null=True, verbose_name='Energy consumers'), + model_name="casestudy", + name="energy_customers", + field=models.CharField( + blank=True, + default=None, + help_text="List any wholesale energy customers that take energy from the development. E.g. 'national grids' or private energy suppliers.", + max_length=120, + null=True, + verbose_name="Energy consumers", + ), ), migrations.AddField( - model_name='casestudy', - name='financial_institutions', - field=models.CharField(blank=True, default=None, help_text='List banks and other financial institutions that have or are considering extending loans or guarantees to the project. Separate with a comma.', max_length=120, null=True, verbose_name='Financial institutions'), + model_name="casestudy", + name="financial_institutions", + field=models.CharField( + blank=True, + default=None, + help_text="List banks and other financial institutions that have or are considering extending loans or guarantees to the project. Separate with a comma.", + max_length=120, + null=True, + verbose_name="Financial institutions", + ), ), migrations.AddField( - model_name='casestudy', - name='image_caption', - field=models.CharField(default=None, max_length=500, null=True, verbose_name='Image caption'), + model_name="casestudy", + name="image_caption", + field=models.CharField( + default=None, max_length=500, null=True, verbose_name="Image caption" + ), ), migrations.AddField( - model_name='casestudy', - name='image_credit', - field=models.CharField(default=None, max_length=200, null=True, verbose_name='Image credit(s)'), + model_name="casestudy", + name="image_credit", + field=models.CharField( + default=None, max_length=200, null=True, verbose_name="Image credit(s)" + ), ), migrations.AddField( - model_name='casestudy', - name='media_coverage_independent', - field=models.TextField(default=None, help_text='Provide any links to grassroots/independent media coverage.', max_length=500, null=True, verbose_name='Independent grassroots reports'), + model_name="casestudy", + name="media_coverage_independent", + field=models.TextField( + default=None, + help_text="Provide any links to grassroots/independent media coverage.", + max_length=500, + null=True, + verbose_name="Independent grassroots reports", + ), ), migrations.AddField( - model_name='casestudy', - name='media_coverage_mainstream', - field=models.TextField(default=None, help_text='Provide any links to mainstream media coverage.', max_length=500, null=True, verbose_name='Links to media reports'), + model_name="casestudy", + name="media_coverage_mainstream", + field=models.TextField( + default=None, + help_text="Provide any links to mainstream media coverage.", + max_length=500, + null=True, + verbose_name="Links to media reports", + ), ), migrations.AddField( - model_name='casestudy', - name='project_owners', - field=models.CharField(blank=True, default=None, help_text='List companies or organisations that own the project and/or facilities. Separate with a comma.', max_length=120, null=True, verbose_name='Project and facility owners'), + model_name="casestudy", + name="project_owners", + field=models.CharField( + blank=True, + default=None, + help_text="List companies or organisations that own the project and/or facilities. Separate with a comma.", + max_length=120, + null=True, + verbose_name="Project and facility owners", + ), ), migrations.AddField( - model_name='casestudy', - name='shareholders', - field=models.CharField(blank=True, default=None, help_text="List shareholders of the project owners you've just listed. Separate with a comma.", max_length=120, null=True, verbose_name='Shareholders of the project owners'), + model_name="casestudy", + name="shareholders", + field=models.CharField( + blank=True, + default=None, + help_text="List shareholders of the project owners you've just listed. Separate with a comma.", + max_length=120, + null=True, + verbose_name="Shareholders of the project owners", + ), ), migrations.AddField( - model_name='casestudy', - name='social_media_links', - field=models.TextField(blank=True, default=None, help_text='Add any links to social media accounts directly relating to the project.', max_length=500, null=True, verbose_name='Social media links'), + model_name="casestudy", + name="social_media_links", + field=models.TextField( + blank=True, + default=None, + help_text="Add any links to social media accounts directly relating to the project.", + max_length=500, + null=True, + verbose_name="Social media links", + ), ), migrations.AddField( - model_name='casestudy', - name='start_year', - field=models.IntegerField(blank=True, choices=[(1977, 1977), (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)], default=None, help_text="Select the year the project was started. If the project hasn't begun, select the projected start year.", null=True, verbose_name='Start year'), + model_name="casestudy", + name="start_year", + field=models.IntegerField( + blank=True, + choices=[ + (1977, 1977), + (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), + ], + default=None, + help_text="Select the year the project was started. If the project hasn't begun, select the projected start year.", + null=True, + verbose_name="Start year", + ), ), migrations.AddField( - model_name='casestudy', - name='video_caption', - field=models.CharField(default=None, max_length=500, null=True, verbose_name='Video caption'), + model_name="casestudy", + name="video_caption", + field=models.CharField( + default=None, max_length=500, null=True, verbose_name="Video caption" + ), ), migrations.AddField( - model_name='casestudy', - name='video_credit', - field=models.CharField(default=None, max_length=500, null=True, verbose_name='Video credit(s)'), + model_name="casestudy", + name="video_credit", + field=models.CharField( + default=None, max_length=500, null=True, verbose_name="Video credit(s)" + ), ), migrations.AlterField( - model_name='casestudy', - name='affects_indigenous', - field=models.BooleanField(help_text='Does the project affect indigenous communities?', verbose_name='Affects indigenous people?'), + model_name="casestudy", + name="affects_indigenous", + field=models.BooleanField( + help_text="Does the project affect indigenous communities?", + verbose_name="Affects indigenous people?", + ), ), migrations.AlterField( - model_name='casestudy', - name='community_voices', - field=models.TextField(help_text='Add any direct quotes from members of the community that relate to this project', verbose_name='Community Voices'), + model_name="casestudy", + name="community_voices", + field=models.TextField( + help_text="Add any direct quotes from members of the community that relate to this project", + verbose_name="Community Voices", + ), ), migrations.AlterField( - model_name='casestudy', - name='date_created', + model_name="casestudy", + name="date_created", field=models.DateTimeField(auto_now_add=True), ), migrations.AlterField( - model_name='casestudy', - name='land_ownership_details', - field=models.CharField(blank=True, help_text="Please specify details about land ownership if you chose 'other'", max_length=256, null=True, verbose_name='Land ownership details'), + model_name="casestudy", + name="land_ownership_details", + field=models.CharField( + blank=True, + help_text="Please specify details about land ownership if you chose 'other'", + max_length=256, + null=True, + verbose_name="Land ownership details", + ), ), migrations.AlterField( - model_name='casestudy', - name='video', - field=models.URLField(help_text='Copy the URL to a related YouTube™ video that relates to the case study.', max_length=43, validators=[apps.map.validators.YoutubeURLValidator()], verbose_name='YouTube Video'), + model_name="casestudy", + name="video", + field=models.URLField( + help_text="Copy the URL to a related YouTube™ video that relates to the case study.", + max_length=43, + validators=[apps.map.validators.YoutubeURLValidator()], + verbose_name="YouTube Video", + ), ), ] diff --git a/apps/map/migrations/0011_casestudy_generation_technology.py b/apps/map/migrations/0011_casestudy_generation_technology.py index 9566268..5559df1 100644 --- a/apps/map/migrations/0011_casestudy_generation_technology.py +++ b/apps/map/migrations/0011_casestudy_generation_technology.py @@ -7,14 +7,38 @@ from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [ - ('map', '0010_auto_20171011_1606'), - ] + dependencies = [("map", "0010_auto_20171011_1606")] operations = [ migrations.AddField( - model_name='casestudy', - name='generation_technology', - field=models.CharField(blank=True, choices=[('SSWE', 'Small-scale wind energy (less than 500kW)'), ('LSWE', 'Large-scale wind energy (more than 500kW)'), ('SSPV', 'Small-scale photovoltaic electricity (less than 500kW)'), ('LSPV', 'Large-scale photovoltaic electricity (more than 500kW)'), ('STHE', 'Solar thermal electricity (e.g using parabolic reflectors)'), ('SHYD', 'Small hydroelectric (less than 1MW)'), ('MHYD', 'Medium hydroelectric (between 1-20MW)'), ('LHYD', 'Large hydroelectric (more than 20MW - often not considered renewable)'), ('GEOT', 'Geothermal electricity'), ('BIOG', 'Biogas turbine'), ('OTHB', 'Other biomass (including liquid/solid biofuel)')], default=None, help_text='Select the type of renewable energy generation that most applies to this case study.', max_length=4, null=True, verbose_name='Generation technology'), - ), + model_name="casestudy", + name="generation_technology", + field=models.CharField( + blank=True, + choices=[ + ("SSWE", "Small-scale wind energy (less than 500kW)"), + ("LSWE", "Large-scale wind energy (more than 500kW)"), + ("SSPV", "Small-scale photovoltaic electricity (less than 500kW)"), + ("LSPV", "Large-scale photovoltaic electricity (more than 500kW)"), + ( + "STHE", + "Solar thermal electricity (e.g using parabolic reflectors)", + ), + ("SHYD", "Small hydroelectric (less than 1MW)"), + ("MHYD", "Medium hydroelectric (between 1-20MW)"), + ( + "LHYD", + "Large hydroelectric (more than 20MW - often not considered renewable)", + ), + ("GEOT", "Geothermal electricity"), + ("BIOG", "Biogas turbine"), + ("OTHB", "Other biomass (including liquid/solid biofuel)"), + ], + default=None, + help_text="Select the type of renewable energy generation that most applies to this case study.", + max_length=4, + null=True, + verbose_name="Generation technology", + ), + ) ] diff --git a/apps/map/migrations/0012_auto_20171012_1610.py b/apps/map/migrations/0012_auto_20171012_1610.py index 425c272..a4b5eff 100644 --- a/apps/map/migrations/0012_auto_20171012_1610.py +++ b/apps/map/migrations/0012_auto_20171012_1610.py @@ -9,39 +9,92 @@ import django_countries.fields class Migration(migrations.Migration): - dependencies = [ - ('map', '0011_casestudy_generation_technology'), - ] + dependencies = [("map", "0011_casestudy_generation_technology")] operations = [ migrations.AddField( - model_name='casestudy', - name='biomass_detail', - field=models.CharField(blank=True, default=None, help_text='If you selected biogas or biomass, please describe the feedstock (where the fuel came from e.g. corn, algae, anaerobic digestion, commercial waste etc)', max_length=200, null=True, verbose_name='Generation technology detail'), + model_name="casestudy", + name="biomass_detail", + field=models.CharField( + blank=True, + default=None, + help_text="If you selected biogas or biomass, please describe the feedstock (where the fuel came from e.g. corn, algae, anaerobic digestion, commercial waste etc)", + max_length=200, + null=True, + verbose_name="Generation technology detail", + ), ), migrations.AddField( - model_name='casestudy', - name='generation_technology_other', - field=models.CharField(blank=True, default=None, help_text='If you selected other, please specify the generation technology (e.g. tidal, wave etc)', max_length=200, null=True, verbose_name='Other generation type'), + model_name="casestudy", + name="generation_technology_other", + field=models.CharField( + blank=True, + default=None, + help_text="If you selected other, please specify the generation technology (e.g. tidal, wave etc)", + max_length=200, + null=True, + verbose_name="Other generation type", + ), ), migrations.AddField( - model_name='casestudy', - name='total_generation_capacity', - field=models.IntegerField(blank=True, default=None, help_text='Please enter the total generation capacity of the project in kW', null=True, verbose_name='Total generation capacity (in kW)'), + model_name="casestudy", + name="total_generation_capacity", + field=models.IntegerField( + blank=True, + default=None, + help_text="Please enter the total generation capacity of the project in kW", + null=True, + verbose_name="Total generation capacity (in kW)", + ), ), migrations.AlterField( - model_name='casestudy', - name='country', - field=django_countries.fields.CountryField(help_text='Select the country of the project', max_length=2, verbose_name='Country field'), + model_name="casestudy", + name="country", + field=django_countries.fields.CountryField( + help_text="Select the country of the project", + max_length=2, + verbose_name="Country field", + ), ), migrations.AlterField( - model_name='casestudy', - name='generation_technology', - field=models.CharField(blank=True, choices=[('SSWE', 'Small-scale wind energy (less than 500kW)'), ('LSWE', 'Large-scale wind energy (more than 500kW)'), ('SSPV', 'Small-scale photovoltaic electricity (less than 500kW)'), ('LSPV', 'Large-scale photovoltaic electricity (more than 500kW)'), ('STHE', 'Solar thermal electricity (e.g using parabolic reflectors)'), ('SHYD', 'Small hydroelectric (less than 1MW)'), ('MHYD', 'Medium hydroelectric (between 1-20MW)'), ('LHYD', 'Large hydroelectric (more than 20MW - often not considered renewable)'), ('GEOT', 'Geothermal electricity'), ('BIOG', 'Biogas turbine'), ('OTHB', 'Other biomass (including liquid/solid biofuel)'), ('OTHR', 'Other (tidal, wave etc)')], default=None, help_text='Select the type of renewable energy generation that most applies to this case study.', max_length=4, null=True, verbose_name='Generation technology'), + model_name="casestudy", + name="generation_technology", + field=models.CharField( + blank=True, + choices=[ + ("SSWE", "Small-scale wind energy (less than 500kW)"), + ("LSWE", "Large-scale wind energy (more than 500kW)"), + ("SSPV", "Small-scale photovoltaic electricity (less than 500kW)"), + ("LSPV", "Large-scale photovoltaic electricity (more than 500kW)"), + ( + "STHE", + "Solar thermal electricity (e.g using parabolic reflectors)", + ), + ("SHYD", "Small hydroelectric (less than 1MW)"), + ("MHYD", "Medium hydroelectric (between 1-20MW)"), + ( + "LHYD", + "Large hydroelectric (more than 20MW - often not considered renewable)", + ), + ("GEOT", "Geothermal electricity"), + ("BIOG", "Biogas turbine"), + ("OTHB", "Other biomass (including liquid/solid biofuel)"), + ("OTHR", "Other (tidal, wave etc)"), + ], + default=None, + help_text="Select the type of renewable energy generation that most applies to this case study.", + max_length=4, + null=True, + verbose_name="Generation technology", + ), ), migrations.AlterField( - model_name='casestudy', - name='location', - field=django.contrib.gis.db.models.fields.PointField(help_text='Place a marker using the tools on the left of the map. Zoom in as far as you can so the placement is accurate (important)', srid=4326, verbose_name='Project location'), + model_name="casestudy", + name="location", + field=django.contrib.gis.db.models.fields.PointField( + help_text="Place a marker using the tools on the left of the map. Zoom in as far as you can so the placement is accurate (important)", + srid=4326, + verbose_name="Project location", + ), ), ] diff --git a/apps/map/migrations/0013_auto_20171012_1640.py b/apps/map/migrations/0013_auto_20171012_1640.py index c73f169..e879548 100644 --- a/apps/map/migrations/0013_auto_20171012_1640.py +++ b/apps/map/migrations/0013_auto_20171012_1640.py @@ -7,29 +7,88 @@ from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [ - ('map', '0012_auto_20171012_1610'), - ] + dependencies = [("map", "0012_auto_20171012_1610")] operations = [ migrations.AddField( - model_name='casestudy', - name='technical_or_economic_details', - field=models.CharField(blank=True, default=None, help_text='Specify any additional technical or economic details relating to the project.', max_length=500, null=True, verbose_name='Additional technical or economic details'), + model_name="casestudy", + name="technical_or_economic_details", + field=models.CharField( + blank=True, + default=None, + help_text="Specify any additional technical or economic details relating to the project.", + max_length=500, + null=True, + verbose_name="Additional technical or economic details", + ), ), migrations.AddField( - model_name='casestudy', - name='total_investment', - field=models.IntegerField(blank=True, default=None, help_text='The approximate total investment for the project in USD.', null=True, verbose_name='Total investment (in USD)'), + model_name="casestudy", + name="total_investment", + field=models.IntegerField( + blank=True, + default=None, + help_text="The approximate total investment for the project in USD.", + null=True, + verbose_name="Total investment (in USD)", + ), ), migrations.AlterField( - model_name='casestudy', - name='generation_technology', - field=models.CharField(blank=True, choices=[('Wind energy', (('SSWE', 'Small-scale (less than 500kW)'), ('LSWE', 'Large-scale (more than 500kW)'))), ('Photovoltaic electricity', (('SSPV', 'Small-scale (less than 500kW)'), ('LSPV', 'Large-scale (more than 500kW)'))), ('Hydroelectric', (('SHYD', 'Small-scale (less than 1MW)'), ('MHYD', 'Medium-scale (between 1-20MW)'), ('LHYD', 'Large-scale (more than 20MW - often not considered renewable)'))), ('STHE', 'Solar thermal electricity (e.g using parabolic reflectors)'), ('GEOT', 'Geothermal electricity'), ('BIOG', 'Biogas turbine'), ('OTHB', 'Other biomass (including liquid/solid biofuel)'), ('OTHR', 'Other (tidal, wave etc)')], default=None, help_text='Select the type of renewable energy generation that most applies to this case study.', max_length=4, null=True, verbose_name='Generation technology'), + model_name="casestudy", + name="generation_technology", + field=models.CharField( + blank=True, + choices=[ + ( + "Wind energy", + ( + ("SSWE", "Small-scale (less than 500kW)"), + ("LSWE", "Large-scale (more than 500kW)"), + ), + ), + ( + "Photovoltaic electricity", + ( + ("SSPV", "Small-scale (less than 500kW)"), + ("LSPV", "Large-scale (more than 500kW)"), + ), + ), + ( + "Hydroelectric", + ( + ("SHYD", "Small-scale (less than 1MW)"), + ("MHYD", "Medium-scale (between 1-20MW)"), + ( + "LHYD", + "Large-scale (more than 20MW - often not considered renewable)", + ), + ), + ), + ( + "STHE", + "Solar thermal electricity (e.g using parabolic reflectors)", + ), + ("GEOT", "Geothermal electricity"), + ("BIOG", "Biogas turbine"), + ("OTHB", "Other biomass (including liquid/solid biofuel)"), + ("OTHR", "Other (tidal, wave etc)"), + ], + default=None, + help_text="Select the type of renewable energy generation that most applies to this case study.", + max_length=4, + null=True, + verbose_name="Generation technology", + ), ), migrations.AlterField( - model_name='casestudy', - name='total_generation_capacity', - field=models.PositiveIntegerField(blank=True, default=None, help_text='Please enter the total generation capacity of the project in kW', null=True, verbose_name='Total generation capacity (in kW)'), + model_name="casestudy", + name="total_generation_capacity", + field=models.PositiveIntegerField( + blank=True, + default=None, + help_text="Please enter the total generation capacity of the project in kW", + null=True, + verbose_name="Total generation capacity (in kW)", + ), ), ] diff --git a/apps/map/migrations/0014_auto_20171025_2035.py b/apps/map/migrations/0014_auto_20171025_2035.py index 8474aed..87a95b8 100644 --- a/apps/map/migrations/0014_auto_20171025_2035.py +++ b/apps/map/migrations/0014_auto_20171025_2035.py @@ -7,19 +7,39 @@ from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [ - ('map', '0013_auto_20171012_1640'), - ] + dependencies = [("map", "0013_auto_20171012_1640")] operations = [ migrations.AddField( - model_name='casestudy', - name='power_technology', - field=models.CharField(blank=True, choices=[('PT', 'Power transmission (grid lines, substations etc)'), ('ES', 'Energy storage (pumped storage, compressed air, battery systems etc'), ('OT', 'Others')], default=None, help_text='Select the related energy technology.', max_length=2, null=True, verbose_name='Power technology'), + model_name="casestudy", + name="power_technology", + field=models.CharField( + blank=True, + choices=[ + ("PT", "Power transmission (grid lines, substations etc)"), + ( + "ES", + "Energy storage (pumped storage, compressed air, battery systems etc", + ), + ("OT", "Others"), + ], + default=None, + help_text="Select the related energy technology.", + max_length=2, + null=True, + verbose_name="Power technology", + ), ), migrations.AddField( - model_name='casestudy', - name='power_technology_other', - field=models.CharField(blank=True, default=None, help_text="If you answered 'others', please specify the power technologies.", max_length=128, null=True, verbose_name='Other power technology'), + model_name="casestudy", + name="power_technology_other", + field=models.CharField( + blank=True, + default=None, + help_text="If you answered 'others', please specify the power technologies.", + max_length=128, + null=True, + verbose_name="Other power technology", + ), ), ] diff --git a/apps/map/migrations/0015_auto_20171030_1550.py b/apps/map/migrations/0015_auto_20171030_1550.py index d5cf2aa..1bb73b1 100644 --- a/apps/map/migrations/0015_auto_20171030_1550.py +++ b/apps/map/migrations/0015_auto_20171030_1550.py @@ -7,19 +7,30 @@ from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [ - ('map', '0014_auto_20171025_2035'), - ] + dependencies = [("map", "0014_auto_20171025_2035")] operations = [ migrations.AddField( - model_name='casestudy', - name='energy_storage_capacity', - field=models.IntegerField(blank=True, default=None, help_text='Enter the total capacity of the energy storage system.', null=True, verbose_name='Energy storage capacity'), + model_name="casestudy", + name="energy_storage_capacity", + field=models.IntegerField( + blank=True, + default=None, + help_text="Enter the total capacity of the energy storage system.", + null=True, + verbose_name="Energy storage capacity", + ), ), migrations.AlterField( - model_name='casestudy', - name='affects_indigenous_detail', - field=models.CharField(blank=True, default=None, help_text='What group of indigenous people does the community belong to?', max_length=256, null=True, verbose_name='Affects Indigenous - Details'), + model_name="casestudy", + name="affects_indigenous_detail", + field=models.CharField( + blank=True, + default=None, + help_text="What group of indigenous people does the community belong to?", + max_length=256, + null=True, + verbose_name="Affects Indigenous - Details", + ), ), ] diff --git a/apps/map/migrations/0016_auto_20171031_1442.py b/apps/map/migrations/0016_auto_20171031_1442.py index 2b7a9ba..c5e8b3d 100644 --- a/apps/map/migrations/0016_auto_20171031_1442.py +++ b/apps/map/migrations/0016_auto_20171031_1442.py @@ -7,34 +7,63 @@ from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [ - ('map', '0015_auto_20171030_1550'), - ] + dependencies = [("map", "0015_auto_20171030_1550")] operations = [ migrations.AddField( - model_name='casestudy', - name='definition_of_affected_territories', - field=models.CharField(blank=True, default=None, help_text='In your own words, define the territories that the project will affect.', max_length=512, null=True, verbose_name='Definition of affected territories'), + model_name="casestudy", + name="definition_of_affected_territories", + field=models.CharField( + blank=True, + default=None, + help_text="In your own words, define the territories that the project will affect.", + max_length=512, + null=True, + verbose_name="Definition of affected territories", + ), ), migrations.AddField( - model_name='casestudy', - name='official_project_documents', - field=models.FileField(blank=True, default=None, help_text='Attach any legal or official documents that relate to the project.', null=True, upload_to='', verbose_name='Official project documents'), + model_name="casestudy", + name="official_project_documents", + field=models.FileField( + blank=True, + default=None, + help_text="Attach any legal or official documents that relate to the project.", + null=True, + upload_to="", + verbose_name="Official project documents", + ), ), migrations.AddField( - model_name='casestudy', - name='other_documents', - field=models.FileField(blank=True, default=None, help_text='Attach any other documents that relate to the project.', null=True, upload_to='', verbose_name='Other documents'), + model_name="casestudy", + name="other_documents", + field=models.FileField( + blank=True, + default=None, + help_text="Attach any other documents that relate to the project.", + null=True, + upload_to="", + verbose_name="Other documents", + ), ), migrations.AddField( - model_name='casestudy', - name='shown_on_other_platforms', - field=models.NullBooleanField(default=None, help_text='Tick the box if you would like us to show this case study on other social media platforms', verbose_name='Show on other platforms?'), + model_name="casestudy", + name="shown_on_other_platforms", + field=models.NullBooleanField( + default=None, + help_text="Tick the box if you would like us to show this case study on other social media platforms", + verbose_name="Show on other platforms?", + ), ), migrations.AddField( - model_name='casestudy', - name='shown_on_other_platforms_detail', - field=models.CharField(blank=True, help_text='List the social media platforms that you would like us to specifically publish the case study on', max_length=128, null=True, verbose_name='Show on other platforms - Detail'), + model_name="casestudy", + name="shown_on_other_platforms_detail", + field=models.CharField( + blank=True, + help_text="List the social media platforms that you would like us to specifically publish the case study on", + max_length=128, + null=True, + verbose_name="Show on other platforms - Detail", + ), ), ] diff --git a/apps/map/migrations/0017_auto_20171101_1508.py b/apps/map/migrations/0017_auto_20171101_1508.py index 914b101..0b96484 100644 --- a/apps/map/migrations/0017_auto_20171101_1508.py +++ b/apps/map/migrations/0017_auto_20171101_1508.py @@ -7,39 +7,82 @@ from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [ - ('map', '0016_auto_20171031_1442'), - ] + dependencies = [("map", "0016_auto_20171031_1442")] operations = [ migrations.AddField( - model_name='casestudy', - name='associated_infrastructure', - field=models.CharField(blank=True, default=None, help_text='List any associated infrastructure in the locality (e.g. tailings dams/mine waste storage and treatment facilities; ore processing facilities; smelting facilities; hydroelectric dams/energy infrastructure; transport infrastructure e.g. roads or rail.', max_length=256, null=True, verbose_name='Associated infrastructure in the locality'), + model_name="casestudy", + name="associated_infrastructure", + field=models.CharField( + blank=True, + default=None, + help_text="List any associated infrastructure in the locality (e.g. tailings dams/mine waste storage and treatment facilities; ore processing facilities; smelting facilities; hydroelectric dams/energy infrastructure; transport infrastructure e.g. roads or rail.", + max_length=256, + null=True, + verbose_name="Associated infrastructure in the locality", + ), ), migrations.AddField( - model_name='casestudy', - name='discharge_time', - field=models.BigIntegerField(blank=True, default=None, help_text='Enter the time it takes to discharge from full capacity at maximum power output (in seconds) (1h=3600s)', null=True, verbose_name='Time for discharge from full capacity'), + model_name="casestudy", + name="discharge_time", + field=models.BigIntegerField( + blank=True, + default=None, + help_text="Enter the time it takes to discharge from full capacity at maximum power output (in seconds) (1h=3600s)", + null=True, + verbose_name="Time for discharge from full capacity", + ), ), migrations.AddField( - model_name='casestudy', - name='maximum_power_output', - field=models.BigIntegerField(blank=True, default=None, help_text='Enter the maximum power output of the storage system in Watts (W). (W=J/s)', null=True, verbose_name='Maximum power output'), + model_name="casestudy", + name="maximum_power_output", + field=models.BigIntegerField( + blank=True, + default=None, + help_text="Enter the maximum power output of the storage system in Watts (W). (W=J/s)", + null=True, + verbose_name="Maximum power output", + ), ), migrations.AddField( - model_name='casestudy', - name='type_of_extraction', - field=models.CharField(blank=True, choices=[('SUR', 'Surface (open pit/open cast/open cut mining'), ('SUB', 'Sub-surface (underground mining)'), ('SEA', 'Seabed mining'), ('URB', 'Urban mining/recycling'), ('OTH', 'Other')], default=None, max_length=2, null=True, verbose_name='Type of extraction'), + model_name="casestudy", + name="type_of_extraction", + field=models.CharField( + blank=True, + choices=[ + ("SUR", "Surface (open pit/open cast/open cut mining"), + ("SUB", "Sub-surface (underground mining)"), + ("SEA", "Seabed mining"), + ("URB", "Urban mining/recycling"), + ("OTH", "Other"), + ], + default=None, + max_length=2, + null=True, + verbose_name="Type of extraction", + ), ), migrations.AddField( - model_name='casestudy', - name='type_of_extraction_other', - field=models.CharField(blank=True, default=None, max_length=128, null=True, verbose_name='Other type of extraction'), + model_name="casestudy", + name="type_of_extraction_other", + field=models.CharField( + blank=True, + default=None, + max_length=128, + null=True, + verbose_name="Other type of extraction", + ), ), migrations.AlterField( - model_name='casestudy', - name='biomass_detail', - field=models.CharField(blank=True, default=None, help_text='If you selected biogas or biomass, please describe the feedstock (where the fuel came from e.g. corn, algae, anaerobic digestion, commercial waste etc)', max_length=200, null=True, verbose_name='Description of feedstock'), + model_name="casestudy", + name="biomass_detail", + field=models.CharField( + blank=True, + default=None, + help_text="If you selected biogas or biomass, please describe the feedstock (where the fuel came from e.g. corn, algae, anaerobic digestion, commercial waste etc)", + max_length=200, + null=True, + verbose_name="Description of feedstock", + ), ), ] diff --git a/apps/map/migrations/0018_auto_20171102_2205.py b/apps/map/migrations/0018_auto_20171102_2205.py index 06d8f9c..2a979a7 100644 --- a/apps/map/migrations/0018_auto_20171102_2205.py +++ b/apps/map/migrations/0018_auto_20171102_2205.py @@ -7,23 +7,32 @@ from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [ - ('map', '0017_auto_20171101_1508'), - ] + dependencies = [("map", "0017_auto_20171101_1508")] operations = [ migrations.RemoveField( - model_name='casestudy', - name='definition_of_affected_territories', + model_name="casestudy", name="definition_of_affected_territories" ), migrations.AddField( - model_name='casestudy', - name='generation_equipment_supplier', - field=models.TextField(blank=True, default=None, help_text='Enter the supplier of the generation equipment. (E.g. Siemens)', null=True, verbose_name='Generation equipment supplier'), + model_name="casestudy", + name="generation_equipment_supplier", + field=models.TextField( + blank=True, + default=None, + help_text="Enter the supplier of the generation equipment. (E.g. Siemens)", + null=True, + verbose_name="Generation equipment supplier", + ), ), migrations.AddField( - model_name='casestudy', - name='name_of_territory_or_area', - field=models.CharField(blank=True, default=None, max_length=512, null=True, verbose_name='Name of territory or area'), + model_name="casestudy", + name="name_of_territory_or_area", + field=models.CharField( + blank=True, + default=None, + max_length=512, + null=True, + verbose_name="Name of territory or area", + ), ), ] diff --git a/apps/map/migrations/0019_casestudy_coordinate_reference_system.py b/apps/map/migrations/0019_casestudy_coordinate_reference_system.py index ad3f8a3..0abb464 100644 --- a/apps/map/migrations/0019_casestudy_coordinate_reference_system.py +++ b/apps/map/migrations/0019_casestudy_coordinate_reference_system.py @@ -7,14 +7,19 @@ from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [ - ('map', '0018_auto_20171102_2205'), - ] + dependencies = [("map", "0018_auto_20171102_2205")] operations = [ migrations.AddField( - model_name='casestudy', - name='coordinate_reference_system', - field=models.CharField(blank=True, default=None, help_text='Enter the coordinate reference system of the shapefiles.', max_length=12, null=True, verbose_name='Coordinate reference system'), - ), + model_name="casestudy", + name="coordinate_reference_system", + field=models.CharField( + blank=True, + default=None, + help_text="Enter the coordinate reference system of the shapefiles.", + max_length=12, + null=True, + verbose_name="Coordinate reference system", + ), + ) ] diff --git a/apps/map/migrations/0020_auto_20171102_2219.py b/apps/map/migrations/0020_auto_20171102_2219.py index 23d8476..2a54927 100644 --- a/apps/map/migrations/0020_auto_20171102_2219.py +++ b/apps/map/migrations/0020_auto_20171102_2219.py @@ -7,18 +7,25 @@ from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [ - ('map', '0019_casestudy_coordinate_reference_system'), - ] + dependencies = [("map", "0019_casestudy_coordinate_reference_system")] operations = [ - migrations.RemoveField( - model_name='casestudy', - name='type_of_extraction_other', - ), + migrations.RemoveField(model_name="casestudy", name="type_of_extraction_other"), migrations.AlterField( - model_name='casestudy', - name='type_of_extraction', - field=models.CharField(blank=True, choices=[('SUR', 'Surface (open pit/open cast/open cut mining'), ('SUB', 'Sub-surface (underground mining)'), ('SEA', 'Seabed mining'), ('URB', 'Urban mining/recycling')], default=None, max_length=2, null=True, verbose_name='Type of extraction'), + model_name="casestudy", + name="type_of_extraction", + field=models.CharField( + blank=True, + choices=[ + ("SUR", "Surface (open pit/open cast/open cut mining"), + ("SUB", "Sub-surface (underground mining)"), + ("SEA", "Seabed mining"), + ("URB", "Urban mining/recycling"), + ], + default=None, + max_length=2, + null=True, + verbose_name="Type of extraction", + ), ), ] diff --git a/apps/map/migrations/0021_auto_20171102_2223.py b/apps/map/migrations/0021_auto_20171102_2223.py index 2cbea23..35112d0 100644 --- a/apps/map/migrations/0021_auto_20171102_2223.py +++ b/apps/map/migrations/0021_auto_20171102_2223.py @@ -7,19 +7,31 @@ from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [ - ('map', '0020_auto_20171102_2219'), - ] + dependencies = [("map", "0020_auto_20171102_2219")] operations = [ migrations.AddField( - model_name='casestudy', - name='project_life_span', - field=models.CharField(blank=None, default=None, help_text='e.g. 12 years of production, 15 years overall', max_length=200, null=True, verbose_name='Project life span'), + model_name="casestudy", + name="project_life_span", + field=models.CharField( + blank=None, + default=None, + help_text="e.g. 12 years of production, 15 years overall", + max_length=200, + null=True, + verbose_name="Project life span", + ), ), migrations.AddField( - model_name='casestudy', - name='size_of_concessions', - field=models.CharField(blank=None, default=None, help_text="Describe the size of concession(s) granted to company/companies (e.g. 'one concession encompassing 2,300 hectares')", max_length=200, null=True, verbose_name='Size of concessions'), + model_name="casestudy", + name="size_of_concessions", + field=models.CharField( + blank=None, + default=None, + help_text="Describe the size of concession(s) granted to company/companies (e.g. 'one concession encompassing 2,300 hectares')", + max_length=200, + null=True, + verbose_name="Size of concessions", + ), ), ] diff --git a/apps/map/migrations/0022_casestudy_projected_production_of_commodities.py b/apps/map/migrations/0022_casestudy_projected_production_of_commodities.py index ce1487f..a7b4bff 100644 --- a/apps/map/migrations/0022_casestudy_projected_production_of_commodities.py +++ b/apps/map/migrations/0022_casestudy_projected_production_of_commodities.py @@ -7,14 +7,19 @@ from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [ - ('map', '0021_auto_20171102_2223'), - ] + dependencies = [("map", "0021_auto_20171102_2223")] operations = [ migrations.AddField( - model_name='casestudy', - name='projected_production_of_commodities', - field=models.CharField(blank=None, default=None, help_text="Describe the projected production of commodities per annum and overall (e.g. '40 million tonnes of iron ore per year, 200 million tonnes over 5 year life of mine'", max_length=256, null=True, verbose_name='Projected production of key commodities'), - ), + model_name="casestudy", + name="projected_production_of_commodities", + field=models.CharField( + blank=None, + default=None, + help_text="Describe the projected production of commodities per annum and overall (e.g. '40 million tonnes of iron ore per year, 200 million tonnes over 5 year life of mine'", + max_length=256, + null=True, + verbose_name="Projected production of key commodities", + ), + ) ] diff --git a/apps/map/migrations/0023_auto_20171102_2232.py b/apps/map/migrations/0023_auto_20171102_2232.py index 726f755..2fe541f 100644 --- a/apps/map/migrations/0023_auto_20171102_2232.py +++ b/apps/map/migrations/0023_auto_20171102_2232.py @@ -7,19 +7,30 @@ from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [ - ('map', '0022_casestudy_projected_production_of_commodities'), - ] + dependencies = [("map", "0022_casestudy_projected_production_of_commodities")] operations = [ migrations.AddField( - model_name='casestudy', - name='approximate_total_investment', - field=models.PositiveIntegerField(blank=None, default=None, help_text='Enter the approximate total investment in USD ($).', null=True, verbose_name='Approximate total investment'), + model_name="casestudy", + name="approximate_total_investment", + field=models.PositiveIntegerField( + blank=None, + default=None, + help_text="Enter the approximate total investment in USD ($).", + null=True, + verbose_name="Approximate total investment", + ), ), migrations.AddField( - model_name='casestudy', - name='contractor_or_supplier_of_technology', - field=models.CharField(blank=None, default=None, help_text='List companies that act as contractors or suppliers of technology related to energy storage.', max_length=256, null=True, verbose_name='Contractor and/or supplier of technology'), + model_name="casestudy", + name="contractor_or_supplier_of_technology", + field=models.CharField( + blank=None, + default=None, + help_text="List companies that act as contractors or suppliers of technology related to energy storage.", + max_length=256, + null=True, + verbose_name="Contractor and/or supplier of technology", + ), ), ] diff --git a/apps/map/migrations/0024_auto_20171102_2250.py b/apps/map/migrations/0024_auto_20171102_2250.py index 2404db4..31cf6ba 100644 --- a/apps/map/migrations/0024_auto_20171102_2250.py +++ b/apps/map/migrations/0024_auto_20171102_2250.py @@ -7,19 +7,76 @@ from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [ - ('map', '0023_auto_20171102_2232'), - ] + dependencies = [("map", "0023_auto_20171102_2232")] operations = [ migrations.AddField( - model_name='casestudy', - name='additional_technical_details', - field=models.CharField(blank=True, default=None, help_text='Add any additional details such as: length, from-to, voltage, substations etc', max_length=512, null=True, verbose_name='Additional technical or economic details'), + model_name="casestudy", + name="additional_technical_details", + field=models.CharField( + blank=True, + default=None, + help_text="Add any additional details such as: length, from-to, voltage, substations etc", + max_length=512, + null=True, + verbose_name="Additional technical or economic details", + ), ), migrations.AddField( - 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')], default=None, help_text='Select the mineral commodity that is primarily mined in this project', max_length=3, null=True, verbose_name='Mineral commodity/commodities'), + 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"), + ], + default=None, + help_text="Select the mineral commodity that is primarily mined in this project", + max_length=3, + null=True, + verbose_name="Mineral commodity/commodities", + ), ), ] diff --git a/apps/map/migrations/0025_auto_20171102_2300.py b/apps/map/migrations/0025_auto_20171102_2300.py index 15d56f8..863e098 100644 --- a/apps/map/migrations/0025_auto_20171102_2300.py +++ b/apps/map/migrations/0025_auto_20171102_2300.py @@ -7,24 +7,51 @@ from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [ - ('map', '0024_auto_20171102_2250'), - ] + dependencies = [("map", "0024_auto_20171102_2250")] operations = [ migrations.AddField( - model_name='casestudy', - name='minerals_or_commodities_other', - field=models.CharField(blank=True, default=None, help_text="Enter the mineral commodity that isn't in the list.", max_length=64, null=True, verbose_name='Other mineral commodity'), + model_name="casestudy", + name="minerals_or_commodities_other", + field=models.CharField( + blank=True, + default=None, + help_text="Enter the mineral commodity that isn't in the list.", + max_length=64, + null=True, + verbose_name="Other mineral commodity", + ), ), migrations.AddField( - model_name='casestudy', - name='use_in_energy_economy', - field=models.CharField(blank=True, choices=[('WTM', 'Wind turbine manufacturing'), ('SPM', 'Solar panel manufacturing'), ('STM', 'Solar thermal system manufacturing'), ('HGM', 'Hydropower generator manufacturing'), ('GGM', 'Geothermal generator manufacturing'), ('ESS', 'Energy storage (inc. battery systems)'), ('OTR', 'Others')], default=None, help_text='Select the potential use of the minerals in the renewable energy economy', max_length=3, null=True, verbose_name='Potential user in renewable energy economy'), + model_name="casestudy", + name="use_in_energy_economy", + field=models.CharField( + blank=True, + choices=[ + ("WTM", "Wind turbine manufacturing"), + ("SPM", "Solar panel manufacturing"), + ("STM", "Solar thermal system manufacturing"), + ("HGM", "Hydropower generator manufacturing"), + ("GGM", "Geothermal generator manufacturing"), + ("ESS", "Energy storage (inc. battery systems)"), + ("OTR", "Others"), + ], + default=None, + help_text="Select the potential use of the minerals in the renewable energy economy", + max_length=3, + null=True, + verbose_name="Potential user in renewable energy economy", + ), ), migrations.AddField( - model_name='casestudy', - name='use_in_energy_economy_other', - field=models.CharField(blank=True, default=None, max_length=128, null=True, verbose_name='Other use in energy economy'), + model_name="casestudy", + name="use_in_energy_economy_other", + field=models.CharField( + blank=True, + default=None, + max_length=128, + null=True, + verbose_name="Other use in energy economy", + ), ), ] diff --git a/apps/map/migrations/0026_auto_20171102_2326.py b/apps/map/migrations/0026_auto_20171102_2326.py index 43fe7d2..868ae73 100644 --- a/apps/map/migrations/0026_auto_20171102_2326.py +++ b/apps/map/migrations/0026_auto_20171102_2326.py @@ -7,19 +7,39 @@ from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [ - ('map', '0025_auto_20171102_2300'), - ] + dependencies = [("map", "0025_auto_20171102_2300")] operations = [ migrations.AddField( - model_name='casestudy', - name='positive_case_type', - field=models.CharField(blank=True, choices=[('CREP', 'Community renewable energy project'), ('EACP', 'Energy as a commons project'), ('PSEP', 'Public/state (federal, state, municipal) energy project'), ('CORS', 'A case of responsible sourcing/supply chain/lifecycle management')], default=None, help_text='Select the most relevant type of positive case', max_length=4, null=True, verbose_name='What kind of positive case is this entry about?'), + model_name="casestudy", + name="positive_case_type", + field=models.CharField( + blank=True, + choices=[ + ("CREP", "Community renewable energy project"), + ("EACP", "Energy as a commons project"), + ("PSEP", "Public/state (federal, state, municipal) energy project"), + ( + "CORS", + "A case of responsible sourcing/supply chain/lifecycle management", + ), + ], + default=None, + help_text="Select the most relevant type of positive case", + max_length=4, + null=True, + verbose_name="What kind of positive case is this entry about?", + ), ), migrations.AddField( - model_name='casestudy', - name='socioeconomic_benefits', - field=models.TextField(blank=True, default=None, 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', null=True, verbose_name='Socio-economic benefits'), + model_name="casestudy", + name="socioeconomic_benefits", + field=models.TextField( + blank=True, + default=None, + 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", + null=True, + verbose_name="Socio-economic benefits", + ), ), ] diff --git a/apps/map/migrations/0027_auto_20171102_2346.py b/apps/map/migrations/0027_auto_20171102_2346.py index eb24cad..9cfdd09 100644 --- a/apps/map/migrations/0027_auto_20171102_2346.py +++ b/apps/map/migrations/0027_auto_20171102_2346.py @@ -7,29 +7,53 @@ from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [ - ('map', '0026_auto_20171102_2326'), - ] + dependencies = [("map", "0026_auto_20171102_2326")] operations = [ migrations.AddField( - model_name='casestudy', - name='identified_partnerships', - field=models.CharField(blank=True, default=None, help_text='Are you looking for partnerships or have any clearly identified need? If so, please describe it here.', max_length=256, null=True, verbose_name='Identified partnerships'), + model_name="casestudy", + name="identified_partnerships", + field=models.CharField( + blank=True, + default=None, + help_text="Are you looking for partnerships or have any clearly identified need? If so, please describe it here.", + max_length=256, + null=True, + verbose_name="Identified partnerships", + ), ), migrations.AddField( - model_name='casestudy', - name='key_actors_involved', - field=models.CharField(blank=True, default=None, max_length=256, null=True, verbose_name='Key actors involved (individual/organisational)'), + model_name="casestudy", + name="key_actors_involved", + field=models.CharField( + blank=True, + default=None, + max_length=256, + null=True, + verbose_name="Key actors involved (individual/organisational)", + ), ), migrations.AddField( - model_name='casestudy', - name='obstacles_and_hindrances', - field=models.CharField(blank=True, default=None, help_text='List any obstacles or hindrances experienced in the course of the project', max_length=512, null=True, verbose_name='Obstacles and hindrances'), + model_name="casestudy", + name="obstacles_and_hindrances", + field=models.CharField( + blank=True, + default=None, + help_text="List any obstacles or hindrances experienced in the course of the project", + max_length=512, + null=True, + verbose_name="Obstacles and hindrances", + ), ), migrations.AddField( - model_name='casestudy', - name='project_status_detail', - field=models.TextField(blank=True, default=None, help_text="Describe the current status of the project, expanding beyond 'existing', 'under construction' etc", null=True, verbose_name='Current status of the project'), + model_name="casestudy", + name="project_status_detail", + field=models.TextField( + blank=True, + default=None, + help_text="Describe the current status of the project, expanding beyond 'existing', 'under construction' etc", + null=True, + verbose_name="Current status of the project", + ), ), ] diff --git a/apps/map/migrations/0028_auto_20171102_2358.py b/apps/map/migrations/0028_auto_20171102_2358.py index d39bbab..1cdfbf1 100644 --- a/apps/map/migrations/0028_auto_20171102_2358.py +++ b/apps/map/migrations/0028_auto_20171102_2358.py @@ -7,21 +7,27 @@ from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [ - ('map', '0027_auto_20171102_2346'), - ] + dependencies = [("map", "0027_auto_20171102_2346")] operations = [ migrations.CreateModel( - name='Shapefile', + name="Shapefile", fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('file', models.FileField(upload_to='shapefiles/')), + ( + "id", + models.AutoField( + auto_created=True, + primary_key=True, + serialize=False, + verbose_name="ID", + ), + ), + ("file", models.FileField(upload_to="shapefiles/")), ], ), migrations.AddField( - model_name='casestudy', - name='shapefiles', - field=models.ManyToManyField(to='map.Shapefile'), + model_name="casestudy", + name="shapefiles", + field=models.ManyToManyField(to="map.Shapefile"), ), ] diff --git a/apps/map/migrations/0029_casestudy_negative_case_reasons.py b/apps/map/migrations/0029_casestudy_negative_case_reasons.py index 425a857..1336f7a 100644 --- a/apps/map/migrations/0029_casestudy_negative_case_reasons.py +++ b/apps/map/migrations/0029_casestudy_negative_case_reasons.py @@ -8,14 +8,42 @@ import multiselectfield.db.fields class Migration(migrations.Migration): - dependencies = [ - ('map', '0028_auto_20171102_2358'), - ] + dependencies = [("map", "0028_auto_20171102_2358")] operations = [ migrations.AddField( - model_name='casestudy', - name='negative_case_reasons', - field=multiselectfield.db.fields.MultiSelectField(blank=True, choices=[('VOLR', 'Violation of land rights'), ('VOHR', 'Violation of fundamental human rights, indigenous rights and/or other collective rights'), ('EIMP', 'Environmental impacts (severe impacts on ecosystems / violation of laws, plans or programs of environmental conservation or territorial governance systems etc.'), ('NCUL', 'Negative cultural impacts (erosion/destruction of bio-cultural heritage, impacts on sacred land etc)'), ('AGGR', 'Aggression/threats to community members opposed to the project, collaboration with organized crime etc'), ('ALAB', 'Abusive labour practices'), ('CRUP', 'Corruption and/or irregular permitting or contracting, conflicts of interest etc'), ('OTHR', 'Other reasons')], default=None, max_length=39, null=True), - ), + model_name="casestudy", + name="negative_case_reasons", + field=multiselectfield.db.fields.MultiSelectField( + blank=True, + choices=[ + ("VOLR", "Violation of land rights"), + ( + "VOHR", + "Violation of fundamental human rights, indigenous rights and/or other collective rights", + ), + ( + "EIMP", + "Environmental impacts (severe impacts on ecosystems / violation of laws, plans or programs of environmental conservation or territorial governance systems etc.", + ), + ( + "NCUL", + "Negative cultural impacts (erosion/destruction of bio-cultural heritage, impacts on sacred land etc)", + ), + ( + "AGGR", + "Aggression/threats to community members opposed to the project, collaboration with organized crime etc", + ), + ("ALAB", "Abusive labour practices"), + ( + "CRUP", + "Corruption and/or irregular permitting or contracting, conflicts of interest etc", + ), + ("OTHR", "Other reasons"), + ], + default=None, + max_length=39, + null=True, + ), + ) ] diff --git a/apps/map/migrations/0030_auto_20171103_1608.py b/apps/map/migrations/0030_auto_20171103_1608.py index 4c2bce1..68063ba 100644 --- a/apps/map/migrations/0030_auto_20171103_1608.py +++ b/apps/map/migrations/0030_auto_20171103_1608.py @@ -7,19 +7,24 @@ from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [ - ('map', '0029_casestudy_negative_case_reasons'), - ] + dependencies = [("map", "0029_casestudy_negative_case_reasons")] operations = [ migrations.AddField( - model_name='casestudy', - name='wants_conversation_with_ojuso', - field=models.NullBooleanField(default=None, help_text='This would be a conversation about challenging or engaging related developers, companies and investors.', verbose_name='Would you like to have a conversation with the ojuso team?'), + model_name="casestudy", + name="wants_conversation_with_ojuso", + field=models.NullBooleanField( + default=None, + help_text="This would be a conversation about challenging or engaging related developers, companies and investors.", + verbose_name="Would you like to have a conversation with the ojuso team?", + ), ), migrations.AlterField( - model_name='casestudy', - name='describe_ecosystem', - field=models.TextField(help_text='In your own words, add more detail about the ecosystem.', verbose_name='Describe the ecosystem'), + model_name="casestudy", + name="describe_ecosystem", + field=models.TextField( + help_text="In your own words, add more detail about the ecosystem.", + verbose_name="Describe the ecosystem", + ), ), ] diff --git a/apps/map/migrations/0031_auto_20171103_1610.py b/apps/map/migrations/0031_auto_20171103_1610.py index 76301bf..970ed8f 100644 --- a/apps/map/migrations/0031_auto_20171103_1610.py +++ b/apps/map/migrations/0031_auto_20171103_1610.py @@ -7,14 +7,15 @@ from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [ - ('map', '0030_auto_20171103_1608'), - ] + dependencies = [("map", "0030_auto_20171103_1608")] operations = [ migrations.AlterField( - model_name='casestudy', - name='synopsis', - field=models.TextField(help_text='Briefly describe the project. This will be displayed at the top of the case study page. Maximum 500 chars (about 3½ tweets)', verbose_name='Synopsis'), - ), + model_name="casestudy", + name="synopsis", + field=models.TextField( + help_text="Briefly describe the project. This will be displayed at the top of the case study page. Maximum 500 chars (about 3½ tweets)", + verbose_name="Synopsis", + ), + ) ] diff --git a/apps/map/migrations/0032_auto_20171103_1745.py b/apps/map/migrations/0032_auto_20171103_1745.py index 0e30109..990a98a 100644 --- a/apps/map/migrations/0032_auto_20171103_1745.py +++ b/apps/map/migrations/0032_auto_20171103_1745.py @@ -7,14 +7,39 @@ from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [ - ('map', '0031_auto_20171103_1610'), - ] + dependencies = [("map", "0031_auto_20171103_1610")] operations = [ migrations.AlterField( - model_name='casestudy', - name='type_of_ecosystem', - field=models.CharField(blank=True, choices=[('Water Based', (('MARINE', 'Marine (e.g. Ocean, Sea)'), ('FRESH', 'Freshwater (e.g. Freshwater, Lake)'))), ('Land Based', (('FOREST', 'Forest/Jungle'), ('AGRI', 'Agricultural Land'), ('GRASS', 'Grassland'), ('DESERT', 'Desert (Tundra, Ice or Sand)'), ('WETLND', 'Wetland (Marsh, Mangrove, Peat Soil)'), ('URBAN', 'Urban')))], default=None, help_text='Select the most relevant type of ecosystem.', max_length=6, null=True, verbose_name='Type of ecosystem'), - ), + model_name="casestudy", + name="type_of_ecosystem", + field=models.CharField( + blank=True, + choices=[ + ( + "Water Based", + ( + ("MARINE", "Marine (e.g. Ocean, Sea)"), + ("FRESH", "Freshwater (e.g. Freshwater, Lake)"), + ), + ), + ( + "Land Based", + ( + ("FOREST", "Forest/Jungle"), + ("AGRI", "Agricultural Land"), + ("GRASS", "Grassland"), + ("DESERT", "Desert (Tundra, Ice or Sand)"), + ("WETLND", "Wetland (Marsh, Mangrove, Peat Soil)"), + ("URBAN", "Urban"), + ), + ), + ], + default=None, + help_text="Select the most relevant type of ecosystem.", + max_length=6, + null=True, + verbose_name="Type of ecosystem", + ), + ) ] diff --git a/apps/map/migrations/0033_auto_20171103_2230.py b/apps/map/migrations/0033_auto_20171103_2230.py index a5a0fbe..2662224 100644 --- a/apps/map/migrations/0033_auto_20171103_2230.py +++ b/apps/map/migrations/0033_auto_20171103_2230.py @@ -7,44 +7,88 @@ from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [ - ('map', '0032_auto_20171103_1745'), - ] + dependencies = [("map", "0032_auto_20171103_1745")] operations = [ migrations.AddField( - model_name='casestudy', - name='isolated_or_widespread_description', - field=models.TextField(blank=True, default=None, 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?', null=True, verbose_name='Describe if the project is isolated or commonplace.'), + model_name="casestudy", + name="isolated_or_widespread_description", + field=models.TextField( + blank=True, + default=None, + 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?", + null=True, + verbose_name="Describe if the project is isolated or commonplace.", + ), ), migrations.AddField( - model_name='casestudy', - name='negative_case_reasons_other', - field=models.CharField(blank=True, default=None, help_text='Please include other reasons, noting that we aim to focus on projects with substantive negative impacts on vulnerable groups.', max_length=512, null=True, verbose_name='Other reason for negative case'), + model_name="casestudy", + name="negative_case_reasons_other", + field=models.CharField( + blank=True, + default=None, + help_text="Please include other reasons, noting that we aim to focus on projects with substantive negative impacts on vulnerable groups.", + max_length=512, + null=True, + verbose_name="Other reason for negative case", + ), ), migrations.AddField( - model_name='casestudy', - name='negative_socioenvironmental_impacts', - field=models.TextField(blank=True, default=None, 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.', null=True, verbose_name='Describe the negative socio-environmental impacts'), + model_name="casestudy", + name="negative_socioenvironmental_impacts", + field=models.TextField( + blank=True, + default=None, + 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.", + null=True, + verbose_name="Describe the negative socio-environmental impacts", + ), ), migrations.AddField( - model_name='casestudy', - name='participation_mechanisms', - field=models.CharField(blank=True, default=None, help_text='e.g. direct action, local referendums, legal cases, letters or petitions etc', max_length=512, null=True, verbose_name='What mechanisms of participation have been used?'), + model_name="casestudy", + name="participation_mechanisms", + field=models.CharField( + blank=True, + default=None, + help_text="e.g. direct action, local referendums, legal cases, letters or petitions etc", + max_length=512, + null=True, + verbose_name="What mechanisms of participation have been used?", + ), ), migrations.AddField( - model_name='casestudy', - name='potential_partnerships', - field=models.CharField(blank=True, default=None, help_text='Are you looking for partnerships or do you have any clearly identified need? If so, please describe it here.', max_length=512, null=True, verbose_name='Describe potential partnerships'), + model_name="casestudy", + name="potential_partnerships", + field=models.CharField( + blank=True, + default=None, + help_text="Are you looking for partnerships or do you have any clearly identified need? If so, please describe it here.", + max_length=512, + null=True, + verbose_name="Describe potential partnerships", + ), ), migrations.AddField( - model_name='casestudy', - name='when_did_organising_start', - field=models.CharField(blank=True, default=None, help_text='Before the project started? During project implementation? After project implementation? Describe in your own words.', max_length=512, null=True, verbose_name='When did local organising efforts begin?'), + model_name="casestudy", + name="when_did_organising_start", + field=models.CharField( + blank=True, + default=None, + help_text="Before the project started? During project implementation? After project implementation? Describe in your own words.", + max_length=512, + null=True, + verbose_name="When did local organising efforts begin?", + ), ), migrations.AddField( - model_name='casestudy', - name='who_has_been_involved', - field=models.CharField(blank=True, default=None, max_length=512, null=True, verbose_name='Which communities, groups and organisations have been involved?'), + model_name="casestudy", + name="who_has_been_involved", + field=models.CharField( + blank=True, + default=None, + max_length=512, + null=True, + verbose_name="Which communities, groups and organisations have been involved?", + ), ), ] diff --git a/apps/map/migrations/0034_auto_20171103_2254.py b/apps/map/migrations/0034_auto_20171103_2254.py index cd308b4..87303ad 100644 --- a/apps/map/migrations/0034_auto_20171103_2254.py +++ b/apps/map/migrations/0034_auto_20171103_2254.py @@ -7,23 +7,25 @@ from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [ - ('map', '0033_auto_20171103_2230'), - ] + dependencies = [("map", "0033_auto_20171103_2230")] operations = [ migrations.RenameField( - model_name='casestudy', - old_name='isolated_or_widespread_description', - new_name='isolated_or_widespread', - ), - migrations.RemoveField( - model_name='casestudy', - name='shapefiles', + model_name="casestudy", + old_name="isolated_or_widespread_description", + new_name="isolated_or_widespread", ), + migrations.RemoveField(model_name="casestudy", name="shapefiles"), migrations.AddField( - model_name='casestudy', - name='shapefiles', - field=models.FileField(blank=True, default=None, 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', null=True, upload_to='', verbose_name='Shapefiles'), + model_name="casestudy", + name="shapefiles", + field=models.FileField( + blank=True, + default=None, + 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", + null=True, + upload_to="", + verbose_name="Shapefiles", + ), ), ] diff --git a/apps/map/migrations/0035_auto_20180326_0157.py b/apps/map/migrations/0035_auto_20180326_0157.py index 47caa24..1797e2d 100644 --- a/apps/map/migrations/0035_auto_20180326_0157.py +++ b/apps/map/migrations/0035_auto_20180326_0157.py @@ -7,30 +7,214 @@ from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [ - ('map', '0034_auto_20171103_2254'), - ] + dependencies = [("map", "0034_auto_20171103_2254")] operations = [ 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 was completed. If the project hasn't finished, select the projected completion year.", null=True, verbose_name='Completion year'), + 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 was completed. If the project hasn't finished, select the projected completion year.", + null=True, + verbose_name="Completion year", + ), ), migrations.AlterField( - model_name='casestudy', - name='shown_on_other_platforms', - field=models.BooleanField(default=False, help_text='Tick the box if you would like us to show this case study on other social media platforms', verbose_name='Show on other platforms?'), + model_name="casestudy", + name="shown_on_other_platforms", + field=models.BooleanField( + default=False, + help_text="Tick the box if you would like us to show this case study on other social media platforms", + verbose_name="Show on other platforms?", + ), preserve_default=False, ), 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)], default=None, help_text="Select the year the project was started. If the project hasn't begun, select the projected start year.", null=True, verbose_name='Start year'), + 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), + ], + default=None, + help_text="Select the year the project was started. If the project hasn't begun, select the projected start year.", + null=True, + verbose_name="Start year", + ), ), migrations.AlterField( - model_name='casestudy', - name='wants_conversation_with_ojuso', - field=models.BooleanField(default=True, help_text='This would be a conversation about challenging or engaging related developers, companies and investors.', verbose_name='Would you like to have a conversation with the ojuso team?'), + model_name="casestudy", + name="wants_conversation_with_ojuso", + field=models.BooleanField( + default=True, + help_text="This would be a conversation about challenging or engaging related developers, companies and investors.", + verbose_name="Would you like to have a conversation with the ojuso team?", + ), ), ] diff --git a/apps/map/migrations/0036_auto_20180327_0334.py b/apps/map/migrations/0036_auto_20180327_0334.py index 75e8b80..76f00b4 100644 --- a/apps/map/migrations/0036_auto_20180327_0334.py +++ b/apps/map/migrations/0036_auto_20180327_0334.py @@ -7,18 +7,15 @@ from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [ - ('map', '0035_auto_20180326_0157'), - ] + dependencies = [("map", "0035_auto_20180326_0157")] operations = [ migrations.AlterModelOptions( - name='casestudy', - options={'verbose_name_plural': 'case studies'}, + name="casestudy", options={"verbose_name_plural": "case studies"} ), migrations.AddField( - model_name='casestudy', - name='approved', + model_name="casestudy", + name="approved", field=models.BooleanField(default=False), ), ] diff --git a/apps/map/migrations/0037_auto_20180327_0549.py b/apps/map/migrations/0037_auto_20180327_0549.py index 34630d2..b3a43d5 100644 --- a/apps/map/migrations/0037_auto_20180327_0549.py +++ b/apps/map/migrations/0037_auto_20180327_0549.py @@ -7,24 +7,43 @@ from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [ - ('map', '0036_auto_20180327_0334'), - ] + dependencies = [("map", "0036_auto_20180327_0334")] operations = [ migrations.AlterField( - model_name='casestudy', - name='direct_comms', - field=models.TextField(blank=True, default=None, help_text='Add any reports of direct communication between community members and representatives of developers/companies/investors.', max_length=500, null=True, verbose_name='Reports of direct communications'), + model_name="casestudy", + name="direct_comms", + field=models.TextField( + blank=True, + default=None, + help_text="Add any reports of direct communication between community members and representatives of developers/companies/investors.", + max_length=500, + null=True, + verbose_name="Reports of direct communications", + ), ), migrations.AlterField( - model_name='casestudy', - name='projected_production_of_commodities', - field=models.CharField(blank=True, default=None, help_text="Describe the projected production of commodities per annum and overall (e.g. '40 million tonnes of iron ore per year, 200 million tonnes over 5 year life of mine'", max_length=256, null=True, verbose_name='Projected production of key commodities'), + model_name="casestudy", + name="projected_production_of_commodities", + field=models.CharField( + blank=True, + default=None, + help_text="Describe the projected production of commodities per annum and overall (e.g. '40 million tonnes of iron ore per year, 200 million tonnes over 5 year life of mine'", + max_length=256, + null=True, + verbose_name="Projected production of key commodities", + ), ), migrations.AlterField( - model_name='casestudy', - name='size_of_concessions', - field=models.CharField(blank=True, default=None, help_text="Describe the size of concession(s) granted to company/companies (e.g. 'one concession encompassing 2,300 hectares')", max_length=200, null=True, verbose_name='Size of concessions'), + model_name="casestudy", + name="size_of_concessions", + field=models.CharField( + blank=True, + default=None, + help_text="Describe the size of concession(s) granted to company/companies (e.g. 'one concession encompassing 2,300 hectares')", + max_length=200, + null=True, + verbose_name="Size of concessions", + ), ), ] diff --git a/apps/map/migrations/0038_auto_20180328_0146.py b/apps/map/migrations/0038_auto_20180328_0146.py index 7892a7f..6ae3053 100644 --- a/apps/map/migrations/0038_auto_20180328_0146.py +++ b/apps/map/migrations/0038_auto_20180328_0146.py @@ -7,14 +7,21 @@ from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [ - ('map', '0037_auto_20180327_0549'), - ] + dependencies = [("map", "0037_auto_20180327_0549")] operations = [ migrations.AlterField( - model_name='casestudy', - name='sector_of_economy', - field=models.CharField(choices=[('RN', 'Renewable Energy Generation'), ('PG', 'Power Grids'), ('SM', 'Supply of Minerals')], help_text='Which sector of the renewable energy economy is most relevant?', max_length=3, verbose_name='Sector of economy'), - ), + model_name="casestudy", + name="sector_of_economy", + field=models.CharField( + choices=[ + ("RN", "Renewable Energy Generation"), + ("PG", "Power Grids"), + ("SM", "Supply of Minerals"), + ], + help_text="Which sector of the renewable energy economy is most relevant?", + max_length=3, + verbose_name="Sector of economy", + ), + ) ] diff --git a/apps/map/migrations/0039_auto_20180328_0245.py b/apps/map/migrations/0039_auto_20180328_0245.py index 31b5cd2..c223b8d 100644 --- a/apps/map/migrations/0039_auto_20180328_0245.py +++ b/apps/map/migrations/0039_auto_20180328_0245.py @@ -7,19 +7,45 @@ from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [ - ('map', '0038_auto_20180328_0146'), - ] + dependencies = [("map", "0038_auto_20180328_0146")] operations = [ migrations.AlterField( - model_name='casestudy', - name='type_of_extraction', - field=models.CharField(blank=True, choices=[('SUR', 'Surface (open pit/open cast/open cut mining'), ('SUB', 'Sub-surface (underground mining)'), ('SEA', 'Seabed mining'), ('URB', 'Urban mining/recycling')], default=None, max_length=3, null=True, verbose_name='Type of extraction'), + model_name="casestudy", + name="type_of_extraction", + field=models.CharField( + blank=True, + choices=[ + ("SUR", "Surface (open pit/open cast/open cut mining"), + ("SUB", "Sub-surface (underground mining)"), + ("SEA", "Seabed mining"), + ("URB", "Urban mining/recycling"), + ], + default=None, + max_length=3, + null=True, + verbose_name="Type of extraction", + ), ), migrations.AlterField( - model_name='casestudy', - name='use_in_energy_economy', - field=models.CharField(blank=True, choices=[('WTM', 'Wind turbine manufacturing'), ('SPM', 'Solar panel manufacturing'), ('STM', 'Solar thermal system manufacturing'), ('HGM', 'Hydropower generator manufacturing'), ('GGM', 'Geothermal generator manufacturing'), ('ESS', 'Energy storage (inc. battery systems)'), ('OTR', 'Others')], default=None, help_text='Select the potential use of the minerals in the renewable energy economy', max_length=3, null=True, verbose_name='Potential use in renewable energy economy'), + model_name="casestudy", + name="use_in_energy_economy", + field=models.CharField( + blank=True, + choices=[ + ("WTM", "Wind turbine manufacturing"), + ("SPM", "Solar panel manufacturing"), + ("STM", "Solar thermal system manufacturing"), + ("HGM", "Hydropower generator manufacturing"), + ("GGM", "Geothermal generator manufacturing"), + ("ESS", "Energy storage (inc. battery systems)"), + ("OTR", "Others"), + ], + default=None, + help_text="Select the potential use of the minerals in the renewable energy economy", + max_length=3, + null=True, + verbose_name="Potential use in renewable energy economy", + ), ), ] diff --git a/apps/map/migrations/0040_auto_20180328_0309.py b/apps/map/migrations/0040_auto_20180328_0309.py index 4a15442..9c6f9a0 100644 --- a/apps/map/migrations/0040_auto_20180328_0309.py +++ b/apps/map/migrations/0040_auto_20180328_0309.py @@ -7,14 +7,24 @@ from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [ - ('map', '0039_auto_20180328_0245'), - ] + dependencies = [("map", "0039_auto_20180328_0245")] operations = [ migrations.AlterField( - model_name='casestudy', - name='type_of_extraction', - field=models.CharField(blank=True, choices=[('SUR', 'Surface (open pit/open cast/open cut mining)'), ('SUB', 'Sub-surface (underground mining)'), ('SEA', 'Seabed mining'), ('URB', 'Urban mining/recycling')], default=None, max_length=3, null=True, verbose_name='Type of extraction'), - ), + model_name="casestudy", + name="type_of_extraction", + field=models.CharField( + blank=True, + choices=[ + ("SUR", "Surface (open pit/open cast/open cut mining)"), + ("SUB", "Sub-surface (underground mining)"), + ("SEA", "Seabed mining"), + ("URB", "Urban mining/recycling"), + ], + default=None, + max_length=3, + null=True, + verbose_name="Type of extraction", + ), + ) ] diff --git a/apps/map/migrations/0041_auto_20180328_0616.py b/apps/map/migrations/0041_auto_20180328_0616.py index 47fee04..eef74b3 100644 --- a/apps/map/migrations/0041_auto_20180328_0616.py +++ b/apps/map/migrations/0041_auto_20180328_0616.py @@ -8,14 +8,43 @@ import multiselectfield.db.fields class Migration(migrations.Migration): - dependencies = [ - ('map', '0040_auto_20180328_0309'), - ] + dependencies = [("map", "0040_auto_20180328_0309")] operations = [ migrations.AlterField( - model_name='casestudy', - name='negative_case_reasons', - field=multiselectfield.db.fields.MultiSelectField(blank=True, choices=[('VOLR', 'Violation of land rights'), ('VOHR', 'Violation of fundamental human rights, indigenous rights and/or other collective rights'), ('EIMP', 'Environmental impacts (severe impacts on ecosystems / violation of laws, plans or programs of environmental conservation or territorial governance systems etc.'), ('NCUL', 'Negative cultural impacts (erosion/destruction of bio-cultural heritage, impacts on sacred land etc)'), ('AGGR', 'Aggression/threats to community members opposed to the project, collaboration with organized crime etc'), ('ALAB', 'Abusive labour practices'), ('CRUP', 'Corruption and/or irregular permitting or contracting, conflicts of interest etc'), ('OTHR', 'Other reasons')], default=None, max_length=39, null=True, verbose_name='Reasons this is a negative case study'), - ), + model_name="casestudy", + name="negative_case_reasons", + field=multiselectfield.db.fields.MultiSelectField( + blank=True, + choices=[ + ("VOLR", "Violation of land rights"), + ( + "VOHR", + "Violation of fundamental human rights, indigenous rights and/or other collective rights", + ), + ( + "EIMP", + "Environmental impacts (severe impacts on ecosystems / violation of laws, plans or programs of environmental conservation or territorial governance systems etc.", + ), + ( + "NCUL", + "Negative cultural impacts (erosion/destruction of bio-cultural heritage, impacts on sacred land etc)", + ), + ( + "AGGR", + "Aggression/threats to community members opposed to the project, collaboration with organized crime etc", + ), + ("ALAB", "Abusive labour practices"), + ( + "CRUP", + "Corruption and/or irregular permitting or contracting, conflicts of interest etc", + ), + ("OTHR", "Other reasons"), + ], + default=None, + max_length=39, + null=True, + verbose_name="Reasons this is a negative case study", + ), + ) ] diff --git a/apps/map/migrations/0042_auto_20180328_1122.py b/apps/map/migrations/0042_auto_20180328_1122.py index 5dfc209..b526ff1 100644 --- a/apps/map/migrations/0042_auto_20180328_1122.py +++ b/apps/map/migrations/0042_auto_20180328_1122.py @@ -7,14 +7,16 @@ from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [ - ('map', '0041_auto_20180328_0616'), - ] + dependencies = [("map", "0041_auto_20180328_0616")] operations = [ migrations.AlterField( - model_name='casestudy', - name='shown_on_other_platforms', - field=models.BooleanField(default=True, help_text='Tick the box if you would like us to show this case study on other social media platforms', verbose_name='Show on other platforms?'), - ), + model_name="casestudy", + name="shown_on_other_platforms", + field=models.BooleanField( + default=True, + help_text="Tick the box if you would like us to show this case study on other social media platforms", + verbose_name="Show on other platforms?", + ), + ) ] diff --git a/apps/map/migrations/0043_auto_20180329_1044.py b/apps/map/migrations/0043_auto_20180329_1044.py index 2591981..799275f 100644 --- a/apps/map/migrations/0043_auto_20180329_1044.py +++ b/apps/map/migrations/0043_auto_20180329_1044.py @@ -9,79 +9,179 @@ import multiselectfield.db.fields class Migration(migrations.Migration): - dependencies = [ - ('map', '0042_auto_20180328_1122'), - ] + dependencies = [("map", "0042_auto_20180328_1122")] operations = [ migrations.AlterField( - model_name='casestudy', - name='community_voices', - field=models.TextField(blank=True, default=None, help_text='Add any direct quotes from members of the community that relate to this project', null=True, verbose_name='Community Voices'), + model_name="casestudy", + name="community_voices", + field=models.TextField( + blank=True, + default=None, + help_text="Add any direct quotes from members of the community that relate to this project", + null=True, + verbose_name="Community Voices", + ), ), migrations.AlterField( - model_name='casestudy', - name='direct_comms', - field=models.TextField(blank=True, default=None, help_text='Add any reports of direct communication between community members and representatives of developers/companies/investors.', null=True, verbose_name='Reports of direct communications'), + model_name="casestudy", + name="direct_comms", + field=models.TextField( + blank=True, + default=None, + help_text="Add any reports of direct communication between community members and representatives of developers/companies/investors.", + null=True, + verbose_name="Reports of direct communications", + ), ), migrations.AlterField( - model_name='casestudy', - name='discharge_time', - field=models.DecimalField(blank=True, decimal_places=3, default=None, help_text='Enter the time it takes to discharge from full capacity at maximum power output (in hours).', max_digits=6, null=True, verbose_name='Time for discharge from full capacity'), + model_name="casestudy", + name="discharge_time", + field=models.DecimalField( + blank=True, + decimal_places=3, + default=None, + help_text="Enter the time it takes to discharge from full capacity at maximum power output (in hours).", + max_digits=6, + null=True, + verbose_name="Time for discharge from full capacity", + ), ), migrations.AlterField( - model_name='casestudy', - name='energy_storage_capacity', - field=models.DecimalField(blank=True, decimal_places=3, default=None, help_text='Enter the total capacity of the energy storage system in kilowatt-hours (kWh).', max_digits=20, null=True, verbose_name='Energy storage capacity'), + model_name="casestudy", + name="energy_storage_capacity", + field=models.DecimalField( + blank=True, + decimal_places=3, + default=None, + help_text="Enter the total capacity of the energy storage system in kilowatt-hours (kWh).", + max_digits=20, + null=True, + verbose_name="Energy storage capacity", + ), ), migrations.AlterField( - model_name='casestudy', - name='image_caption', - field=models.CharField(default=None, max_length=240, null=True, verbose_name='Image caption'), + model_name="casestudy", + name="image_caption", + field=models.CharField( + default=None, max_length=240, null=True, verbose_name="Image caption" + ), ), migrations.AlterField( - model_name='casestudy', - name='image_credit', - field=models.CharField(default=None, max_length=240, null=True, verbose_name='Image credit(s)'), + model_name="casestudy", + name="image_credit", + field=models.CharField( + default=None, max_length=240, null=True, verbose_name="Image credit(s)" + ), ), 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'), + 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='maximum_power_output', - field=models.DecimalField(blank=True, decimal_places=3, default=None, help_text='Enter the maximum power output of the storage system in kilowatts (kW).', max_digits=12, null=True, verbose_name='Maximum power output'), + model_name="casestudy", + name="maximum_power_output", + field=models.DecimalField( + blank=True, + decimal_places=3, + default=None, + help_text="Enter the maximum power output of the storage system in kilowatts (kW).", + max_digits=12, + null=True, + verbose_name="Maximum power output", + ), ), migrations.AlterField( - model_name='casestudy', - name='media_coverage_independent', - field=models.TextField(default=None, help_text='Provide any links to grassroots/independent media coverage.', null=True, verbose_name='Independent grassroots reports'), + model_name="casestudy", + name="media_coverage_independent", + field=models.TextField( + default=None, + help_text="Provide any links to grassroots/independent media coverage.", + null=True, + verbose_name="Independent grassroots reports", + ), ), migrations.AlterField( - model_name='casestudy', - name='media_coverage_mainstream', - field=models.TextField(default=None, help_text='Provide any links to mainstream media coverage.', null=True, verbose_name='Links to media reports'), + model_name="casestudy", + name="media_coverage_mainstream", + field=models.TextField( + default=None, + help_text="Provide any links to mainstream media coverage.", + null=True, + verbose_name="Links to media reports", + ), ), migrations.AlterField( - model_name='casestudy', - name='type_of_ecosystem', - field=multiselectfield.db.fields.MultiSelectField(blank=True, choices=[('Water Based', (('MARINE', 'Marine (e.g. Ocean, Sea)'), ('FRESH', 'Freshwater (e.g. Freshwater, Lake)'))), ('Land Based', (('FOREST', 'Forest/Jungle'), ('AGRI', 'Agricultural Land'), ('GRASS', 'Grassland'), ('DESERT', 'Desert (Tundra, Ice or Sand)'), ('WETLND', 'Wetland (Marsh, Mangrove, Peat Soil)'), ('URBAN', 'Urban')))], default=None, help_text='Select the most relevant type of ecosystem.', max_length=6, null=True, verbose_name='Type of ecosystem'), + model_name="casestudy", + name="type_of_ecosystem", + field=multiselectfield.db.fields.MultiSelectField( + blank=True, + choices=[ + ( + "Water Based", + ( + ("MARINE", "Marine (e.g. Ocean, Sea)"), + ("FRESH", "Freshwater (e.g. Freshwater, Lake)"), + ), + ), + ( + "Land Based", + ( + ("FOREST", "Forest/Jungle"), + ("AGRI", "Agricultural Land"), + ("GRASS", "Grassland"), + ("DESERT", "Desert (Tundra, Ice or Sand)"), + ("WETLND", "Wetland (Marsh, Mangrove, Peat Soil)"), + ("URBAN", "Urban"), + ), + ), + ], + default=None, + help_text="Select the most relevant type of ecosystem.", + max_length=6, + null=True, + verbose_name="Type of ecosystem", + ), ), migrations.AlterField( - model_name='casestudy', - name='video', - field=models.URLField(blank=True, default=None, help_text='Copy the URL to a related YouTube™ video that relates to the case study.', max_length=43, null=True, validators=[apps.map.validators.YoutubeURLValidator()], verbose_name='YouTube Video'), + model_name="casestudy", + name="video", + field=models.URLField( + blank=True, + default=None, + help_text="Copy the URL to a related YouTube™ video that relates to the case study.", + max_length=43, + null=True, + validators=[apps.map.validators.YoutubeURLValidator()], + verbose_name="YouTube Video", + ), ), migrations.AlterField( - model_name='casestudy', - name='video_caption', - field=models.CharField(blank=True, default=None, max_length=240, null=True, verbose_name='Video caption'), + model_name="casestudy", + name="video_caption", + field=models.CharField( + blank=True, + default=None, + max_length=240, + null=True, + verbose_name="Video caption", + ), ), migrations.AlterField( - model_name='casestudy', - name='video_credit', - field=models.CharField(blank=True, default=None, max_length=240, null=True, verbose_name='Video credit(s)'), + model_name="casestudy", + name="video_credit", + field=models.CharField( + blank=True, + default=None, + max_length=240, + null=True, + verbose_name="Video credit(s)", + ), ), ] diff --git a/apps/map/migrations/0044_auto_20180331.py b/apps/map/migrations/0044_auto_20180331.py index 4c1d9ad..a43b1c8 100644 --- a/apps/map/migrations/0044_auto_20180331.py +++ b/apps/map/migrations/0044_auto_20180331.py @@ -8,39 +8,43 @@ import phonenumber_field.modelfields class Migration(migrations.Migration): - dependencies = [ - ('map', '0043_auto_20180329_1044'), - ] + dependencies = [("map", "0043_auto_20180329_1044")] operations = [ migrations.AddField( - model_name='casestudy', - name='contact_email', - field=models.EmailField(blank=True, max_length=254, verbose_name='Email address'), + model_name="casestudy", + name="contact_email", + field=models.EmailField( + blank=True, max_length=254, verbose_name="Email address" + ), ), migrations.AddField( - model_name='casestudy', - name='contact_facebook', - field=models.URLField(blank=True, verbose_name='Facebook page'), + model_name="casestudy", + name="contact_facebook", + field=models.URLField(blank=True, verbose_name="Facebook page"), ), migrations.AddField( - model_name='casestudy', - name='contact_other', - field=models.TextField(blank=True, verbose_name='Other contact details'), + model_name="casestudy", + name="contact_other", + field=models.TextField(blank=True, verbose_name="Other contact details"), ), migrations.AddField( - model_name='casestudy', - name='contact_phone', - field=phonenumber_field.modelfields.PhoneNumberField(blank=True, max_length=128, verbose_name='Phone number'), + model_name="casestudy", + name="contact_phone", + field=phonenumber_field.modelfields.PhoneNumberField( + blank=True, max_length=128, verbose_name="Phone number" + ), ), migrations.AddField( - model_name='casestudy', - name='contact_twitter', - field=models.CharField(blank=True, max_length=50, verbose_name='Twitter username'), + model_name="casestudy", + name="contact_twitter", + field=models.CharField( + blank=True, max_length=50, verbose_name="Twitter username" + ), ), migrations.AddField( - model_name='casestudy', - name='contact_website', - field=models.URLField(blank=True, verbose_name='Website'), + model_name="casestudy", + name="contact_website", + field=models.URLField(blank=True, verbose_name="Website"), ), ] diff --git a/apps/map/migrations/0045_auto_20180331_0517.py b/apps/map/migrations/0045_auto_20180331_0517.py index 09d05c9..5f30249 100644 --- a/apps/map/migrations/0045_auto_20180331_0517.py +++ b/apps/map/migrations/0045_auto_20180331_0517.py @@ -8,25 +8,36 @@ import phonenumber_field.modelfields class Migration(migrations.Migration): - dependencies = [ - ('map', '0044_auto_20180331'), - ] + dependencies = [("map", "0044_auto_20180331")] operations = [ migrations.AlterField( - model_name='casestudy', - name='contact_phone', - field=phonenumber_field.modelfields.PhoneNumberField(blank=True, help_text='Please include the international prefix, beginning with "+".', max_length=128, verbose_name='Phone number'), + model_name="casestudy", + name="contact_phone", + field=phonenumber_field.modelfields.PhoneNumberField( + blank=True, + help_text='Please include the international prefix, beginning with "+".', + max_length=128, + verbose_name="Phone number", + ), ), migrations.AlterField( - model_name='casestudy', - name='shown_on_other_platforms', - field=models.BooleanField(default=True, verbose_name='Is this case study shown on other platforms?'), + model_name="casestudy", + name="shown_on_other_platforms", + field=models.BooleanField( + default=True, + verbose_name="Is this case study shown on other platforms?", + ), ), migrations.AlterField( - model_name='casestudy', - name='shown_on_other_platforms_detail', - field=models.TextField(blank=True, default='', help_text='Please provide links to other places the case study appears.', verbose_name='Shown on other platforms - Detail'), + model_name="casestudy", + name="shown_on_other_platforms_detail", + field=models.TextField( + blank=True, + default="", + help_text="Please provide links to other places the case study appears.", + verbose_name="Shown on other platforms - Detail", + ), preserve_default=False, ), ] diff --git a/apps/map/migrations/0046_auto_20180331_0604.py b/apps/map/migrations/0046_auto_20180331_0604.py index 1cc75db..83a3020 100644 --- a/apps/map/migrations/0046_auto_20180331_0604.py +++ b/apps/map/migrations/0046_auto_20180331_0604.py @@ -8,15 +8,20 @@ from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [ - ('map', '0045_auto_20180331_0517'), - ] + dependencies = [("map", "0045_auto_20180331_0517")] operations = [ migrations.AlterField( - model_name='casestudy', - name='video', - field=models.URLField(blank=True, default='', help_text='Copy the URL to a YouTube or Vimeo video that relates to the case study.', max_length=80, validators=[apps.map.validators.YouTubeOrVimeoValidator()], verbose_name='Video URL'), + model_name="casestudy", + name="video", + field=models.URLField( + blank=True, + default="", + help_text="Copy the URL to a YouTube or Vimeo video that relates to the case study.", + max_length=80, + validators=[apps.map.validators.YouTubeOrVimeoValidator()], + verbose_name="Video URL", + ), preserve_default=False, - ), + ) ] diff --git a/apps/map/migrations/0047_auto_20180331_0607.py b/apps/map/migrations/0047_auto_20180331_0607.py index 9b37c1a..01e574f 100644 --- a/apps/map/migrations/0047_auto_20180331_0607.py +++ b/apps/map/migrations/0047_auto_20180331_0607.py @@ -8,19 +8,51 @@ import multiselectfield.db.fields class Migration(migrations.Migration): - dependencies = [ - ('map', '0046_auto_20180331_0604'), - ] + dependencies = [("map", "0046_auto_20180331_0604")] operations = [ 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')], default=None, help_text='Select the most relevant type of ecosystem.', max_length=6, null=True, verbose_name='Type of ecosystem'), + 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"), + ], + default=None, + help_text="Select the most relevant type of ecosystem.", + max_length=6, + null=True, + verbose_name="Type of ecosystem", + ), ), 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')], default=None, help_text='Select the most relevant type(s).', max_length=6, null=True, verbose_name='Type(s) of ecosystem'), + 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"), + ], + default=None, + help_text="Select the most relevant type(s).", + max_length=6, + null=True, + verbose_name="Type(s) of ecosystem", + ), ), ] diff --git a/apps/map/migrations/0048_auto_20180331_0933.py b/apps/map/migrations/0048_auto_20180331_0933.py index a660c3e..d473505 100644 --- a/apps/map/migrations/0048_auto_20180331_0933.py +++ b/apps/map/migrations/0048_auto_20180331_0933.py @@ -8,20 +8,71 @@ import multiselectfield.db.fields class Migration(migrations.Migration): - dependencies = [ - ('map', '0047_auto_20180331_0607'), - ] + dependencies = [("map", "0047_auto_20180331_0607")] operations = [ migrations.AddField( - model_name='casestudy', - name='financial_institutions_other', - field=models.TextField(blank=True, help_text='List any other financial institutions not listed above. Put each on a new line.', verbose_name='Financial institutions – other'), + model_name="casestudy", + name="financial_institutions_other", + field=models.TextField( + blank=True, + help_text="List any other financial institutions not listed above. Put each on a new line.", + verbose_name="Financial institutions – other", + ), ), 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')], default='', help_text='Select any financial institutions that have or are considering extending loans or guarantees to the project.', max_length=119, verbose_name='Financial institutions'), + 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"), + ], + default="", + help_text="Select any financial institutions that have or are considering extending loans or guarantees to the project.", + max_length=119, + verbose_name="Financial institutions", + ), preserve_default=False, ), ] diff --git a/apps/map/migrations/0049_auto_20180331_1134.py b/apps/map/migrations/0049_auto_20180331_1134.py index 8d701c0..7a2b497 100644 --- a/apps/map/migrations/0049_auto_20180331_1134.py +++ b/apps/map/migrations/0049_auto_20180331_1134.py @@ -7,27 +7,29 @@ from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [ - ('map', '0048_auto_20180331_0933'), - ] + dependencies = [("map", "0048_auto_20180331_0933")] operations = [ + migrations.RemoveField(model_name="casestudy", name="affects_indigenous"), migrations.RemoveField( - model_name='casestudy', - name='affects_indigenous', - ), - migrations.RemoveField( - model_name='casestudy', - name='affects_indigenous_detail', + model_name="casestudy", name="affects_indigenous_detail" ), migrations.AddField( - model_name='casestudy', - name='people_affected_indigenous', - field=models.TextField(blank=True, help_text='What group or groups of indigenous people are affected by this project? Please separate by newline.', verbose_name='Indigenous people affected'), + model_name="casestudy", + name="people_affected_indigenous", + field=models.TextField( + blank=True, + help_text="What group or groups of indigenous people are affected by this project? Please separate by newline.", + verbose_name="Indigenous people affected", + ), ), migrations.AddField( - model_name='casestudy', - name='people_affected_other', - field=models.TextField(blank=True, help_text='What other group or groups of people are affected by this project? Please separate by newline.', verbose_name='Non-indigenous people affected'), + model_name="casestudy", + name="people_affected_other", + field=models.TextField( + blank=True, + help_text="What other group or groups of people are affected by this project? Please separate by newline.", + verbose_name="Non-indigenous people affected", + ), ), ] diff --git a/apps/map/migrations/0050_auto_20180402_1237.py b/apps/map/migrations/0050_auto_20180402_1237.py index 9624652..fe5f9e6 100644 --- a/apps/map/migrations/0050_auto_20180402_1237.py +++ b/apps/map/migrations/0050_auto_20180402_1237.py @@ -8,14 +8,29 @@ import multiselectfield.db.fields class Migration(migrations.Migration): - dependencies = [ - ('map', '0049_auto_20180331_1134'), - ] + dependencies = [("map", "0049_auto_20180331_1134")] operations = [ 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')], default=None, help_text='Select the most relevant type(s).', max_length=56, null=True, verbose_name='Type(s) of ecosystem'), - ), + 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"), + ], + default=None, + help_text="Select the most relevant type(s).", + max_length=56, + null=True, + verbose_name="Type(s) of ecosystem", + ), + ) ] diff --git a/apps/map/migrations/0051_auto_20180404_2215.py b/apps/map/migrations/0051_auto_20180404_2215.py index b499d8f..eea12bd 100644 --- a/apps/map/migrations/0051_auto_20180404_2215.py +++ b/apps/map/migrations/0051_auto_20180404_2215.py @@ -9,89 +9,246 @@ import multiselectfield.db.fields class Migration(migrations.Migration): - dependencies = [ - ('map', '0050_auto_20180402_1237'), - ] + dependencies = [("map", "0050_auto_20180402_1237")] operations = [ migrations.AlterField( - model_name='casestudy', - name='approximate_total_investment', - field=models.PositiveIntegerField(blank=True, default=None, help_text='Enter the approximate total investment in USD ($).', null=True, verbose_name='Approximate total investment'), + model_name="casestudy", + name="approximate_total_investment", + field=models.PositiveIntegerField( + blank=True, + default=None, + help_text="Enter the approximate total investment in USD ($).", + null=True, + verbose_name="Approximate total investment", + ), ), migrations.AlterField( - model_name='casestudy', - name='biomass_detail', - field=models.CharField(blank=True, default=None, help_text='If you selected biogas or biomass, please describe the feedstock (where the fuel came from e.g. corn, algae, anaerobic digestion, commercial waste etc.)', max_length=200, null=True, verbose_name='Description of feedstock'), + model_name="casestudy", + name="biomass_detail", + field=models.CharField( + blank=True, + default=None, + help_text="If you selected biogas or biomass, please describe the feedstock (where the fuel came from e.g. corn, algae, anaerobic digestion, commercial waste etc.)", + max_length=200, + null=True, + verbose_name="Description of feedstock", + ), ), migrations.AlterField( - model_name='casestudy', - name='community_voices', - field=models.TextField(blank=True, default=None, help_text='Add any direct quotes from members of the community that relate to this project', null=True, verbose_name='Community voices'), + model_name="casestudy", + name="community_voices", + field=models.TextField( + blank=True, + default=None, + help_text="Add any direct quotes from members of the community that relate to this project", + null=True, + verbose_name="Community voices", + ), ), migrations.AlterField( - model_name='casestudy', - name='contractor_or_supplier_of_technology', - field=models.CharField(blank=True, default=None, help_text='List companies that act as contractors or suppliers of technology related to energy storage.', max_length=256, null=True, verbose_name='Contractor and/or supplier of technology'), + model_name="casestudy", + name="contractor_or_supplier_of_technology", + field=models.CharField( + blank=True, + default=None, + help_text="List companies that act as contractors or suppliers of technology related to energy storage.", + max_length=256, + null=True, + verbose_name="Contractor and/or supplier of technology", + ), ), migrations.AlterField( - model_name='casestudy', - name='energy_customers', - field=models.CharField(blank=True, default=None, help_text="List any wholesale customers that take energy from the development. E.g. 'national grids' or private energy suppliers.", max_length=120, null=True, verbose_name='Energy consumers'), + model_name="casestudy", + name="energy_customers", + field=models.CharField( + blank=True, + default=None, + help_text="List any wholesale customers that take energy from the development. E.g. 'national grids' or private energy suppliers.", + max_length=120, + null=True, + verbose_name="Energy consumers", + ), ), migrations.AlterField( - model_name='casestudy', - name='entry_name', - field=models.CharField(help_text='Enter the name of the entry. This should usually be the name of the project.', max_length=128, verbose_name='Name'), + model_name="casestudy", + name="entry_name", + field=models.CharField( + help_text="Enter the name of the entry. This should usually be the name of the project.", + max_length=128, + verbose_name="Name", + ), ), migrations.AlterField( - model_name='casestudy', - name='full_description', - field=models.TextField(help_text='Describe the project in full. Separate paragraphs with a new line Please add as much detail as you feel is necessary here.', verbose_name='Full description'), + model_name="casestudy", + name="full_description", + field=models.TextField( + help_text="Describe the project in full. Separate paragraphs with a new line Please add as much detail as you feel is necessary here.", + verbose_name="Full description", + ), ), migrations.AlterField( - model_name='casestudy', - name='generation_technology', - field=models.CharField(blank=True, choices=[('Wind energy', (('SSWE', 'Small-scale (less than 500 kW)'), ('LSWE', 'Large-scale (more than 500kW)'))), ('Photovoltaic electricity', (('SSPV', 'Small-scale (less than 500 kW)'), ('LSPV', 'Large-scale (more than 500kW)'))), ('Hydroelectric', (('SHYD', 'Small-scale (less than 1MW)'), ('MHYD', 'Medium-scale (between 1-20MW)'), ('LHYD', 'Large-scale (more than 20MW - often not considered renewable)'))), ('STHE', 'Solar thermal electricity (e.g. using parabolic reflectors)'), ('GEOT', 'Geothermal electricity'), ('BIOG', 'Biogas turbine'), ('OTHB', 'Other biomass (including liquid/solid biofuel)'), ('OTHR', 'Other (tidal, wave etc.)')], default=None, help_text='Select the type of renewable energy generation that most applies to this case study.', max_length=4, null=True, verbose_name='Generation technology'), + model_name="casestudy", + name="generation_technology", + field=models.CharField( + blank=True, + choices=[ + ( + "Wind energy", + ( + ("SSWE", "Small-scale (less than 500 kW)"), + ("LSWE", "Large-scale (more than 500kW)"), + ), + ), + ( + "Photovoltaic electricity", + ( + ("SSPV", "Small-scale (less than 500 kW)"), + ("LSPV", "Large-scale (more than 500kW)"), + ), + ), + ( + "Hydroelectric", + ( + ("SHYD", "Small-scale (less than 1MW)"), + ("MHYD", "Medium-scale (between 1-20MW)"), + ( + "LHYD", + "Large-scale (more than 20MW - often not considered renewable)", + ), + ), + ), + ( + "STHE", + "Solar thermal electricity (e.g. using parabolic reflectors)", + ), + ("GEOT", "Geothermal electricity"), + ("BIOG", "Biogas turbine"), + ("OTHB", "Other biomass (including liquid/solid biofuel)"), + ("OTHR", "Other (tidal, wave etc.)"), + ], + default=None, + help_text="Select the type of renewable energy generation that most applies to this case study.", + max_length=4, + null=True, + verbose_name="Generation technology", + ), ), migrations.AlterField( - model_name='casestudy', - name='generation_technology_other', - field=models.CharField(blank=True, default=None, help_text='If you selected other, please specify the generation technology (e.g. tidal, wave etc.)', max_length=200, null=True, verbose_name='Other generation type'), + model_name="casestudy", + name="generation_technology_other", + field=models.CharField( + blank=True, + default=None, + help_text="If you selected other, please specify the generation technology (e.g. tidal, wave etc.)", + max_length=200, + null=True, + verbose_name="Other generation type", + ), ), migrations.AlterField( - model_name='casestudy', - name='land_ownership', - field=models.CharField(choices=[('PRI', 'Private land'), ('PUB', 'Public land'), ('COM', 'Community land'), ('OTH', 'Other')], help_text='What type of ownership/tenure does the land fall under?', max_length=3, verbose_name='Land ownership/tenure'), + model_name="casestudy", + name="land_ownership", + field=models.CharField( + choices=[ + ("PRI", "Private land"), + ("PUB", "Public land"), + ("COM", "Community land"), + ("OTH", "Other"), + ], + help_text="What type of ownership/tenure does the land fall under?", + max_length=3, + verbose_name="Land ownership/tenure", + ), ), migrations.AlterField( - model_name='casestudy', - name='land_ownership_details', - field=models.CharField(blank=True, help_text="Please specify details about land ownership if you chose 'other'", max_length=256, null=True, verbose_name='Land ownership/tenure details'), + model_name="casestudy", + name="land_ownership_details", + field=models.CharField( + blank=True, + help_text="Please specify details about land ownership if you chose 'other'", + max_length=256, + null=True, + verbose_name="Land ownership/tenure details", + ), ), migrations.AlterField( - model_name='casestudy', - name='location', - field=django.contrib.gis.db.models.fields.PointField(help_text='Place a marker using the tools on the left of the map. Zoom in as far as you can so the placement is accurate (important).', srid=4326, verbose_name='Project location'), + model_name="casestudy", + name="location", + field=django.contrib.gis.db.models.fields.PointField( + help_text="Place a marker using the tools on the left of the map. Zoom in as far as you can so the placement is accurate (important).", + srid=4326, + verbose_name="Project location", + ), ), migrations.AlterField( - model_name='casestudy', - name='power_technology', - field=models.CharField(blank=True, choices=[('PT', 'Power transmission (power lines, substations etc.)'), ('ES', 'Energy storage (pumped storage, compressed air, battery systems etc.)'), ('OT', 'Others')], default=None, help_text='Select the related energy technology.', max_length=2, null=True, verbose_name='Power technology'), + model_name="casestudy", + name="power_technology", + field=models.CharField( + blank=True, + choices=[ + ("PT", "Power transmission (power lines, substations etc.)"), + ( + "ES", + "Energy storage (pumped storage, compressed air, battery systems etc.)", + ), + ("OT", "Others"), + ], + default=None, + help_text="Select the related energy technology.", + max_length=2, + null=True, + verbose_name="Power technology", + ), ), migrations.AlterField( - model_name='casestudy', - name='project_status', - field=models.CharField(choices=[('EXSTNG', 'Existing project'), ('UCONST', 'Under construction'), ('PROJCD', 'Planned project')], help_text='What is the current status of the project?', max_length=6, verbose_name='Status of project'), + model_name="casestudy", + name="project_status", + field=models.CharField( + choices=[ + ("EXSTNG", "Existing project"), + ("UCONST", "Under construction"), + ("PROJCD", "Planned project"), + ], + help_text="What is the current status of the project?", + max_length=6, + verbose_name="Status of project", + ), ), migrations.AlterField( - model_name='casestudy', - name='sector_of_economy', - field=models.CharField(choices=[('RN', 'Renewable energy generation'), ('PG', 'Power grids'), ('SM', 'Supply of minerals')], help_text='Which sector of the renewable energy economy is most relevant?', max_length=3, verbose_name='Sector of the renewable energy economy'), + model_name="casestudy", + name="sector_of_economy", + field=models.CharField( + choices=[ + ("RN", "Renewable energy generation"), + ("PG", "Power grids"), + ("SM", "Supply of minerals"), + ], + help_text="Which sector of the renewable energy economy is most relevant?", + max_length=3, + verbose_name="Sector of the renewable energy economy", + ), ), 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')], default=None, help_text='Select the most relevant type(s).', max_length=56, null=True, verbose_name='Type(s) of ecosystem'), + 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"), + ], + default=None, + help_text="Select the most relevant type(s).", + max_length=56, + null=True, + verbose_name="Type(s) of ecosystem", + ), ), ] diff --git a/apps/map/migrations/0052_auto_20180412_0647.py b/apps/map/migrations/0052_auto_20180412_0647.py index d5a571c..7400f27 100644 --- a/apps/map/migrations/0052_auto_20180412_0647.py +++ b/apps/map/migrations/0052_auto_20180412_0647.py @@ -10,84 +10,232 @@ import multiselectfield.db.fields class Migration(migrations.Migration): - dependencies = [ - ('map', '0051_auto_20180404_2215'), - ] + dependencies = [("map", "0051_auto_20180404_2215")] operations = [ migrations.AlterField( - model_name='casestudy', - name='biomass_detail', - field=models.CharField(blank=True, default=None, help_text='If you selected biogas or biomass, please describe the feedstock (where the fuel came from e.g. corn, algae, anaerobic digestion, commercial waste etc)', max_length=200, null=True, verbose_name='Description of feedstock'), + model_name="casestudy", + name="biomass_detail", + field=models.CharField( + blank=True, + default=None, + help_text="If you selected biogas or biomass, please describe the feedstock (where the fuel came from e.g. corn, algae, anaerobic digestion, commercial waste etc)", + max_length=200, + null=True, + verbose_name="Description of feedstock", + ), ), migrations.AlterField( - model_name='casestudy', - name='community_voices', - field=models.TextField(blank=True, default=None, help_text='Add any direct quotes from members of the community that relate to this project', null=True, verbose_name='Community Voices'), + model_name="casestudy", + name="community_voices", + field=models.TextField( + blank=True, + default=None, + help_text="Add any direct quotes from members of the community that relate to this project", + null=True, + verbose_name="Community Voices", + ), ), migrations.AlterField( - model_name='casestudy', - name='country', - field=django_countries.fields.CountryField(help_text='Select the country of the project', max_length=2, verbose_name='Country'), + model_name="casestudy", + name="country", + field=django_countries.fields.CountryField( + help_text="Select the country of the project", + max_length=2, + verbose_name="Country", + ), ), migrations.AlterField( - model_name='casestudy', - name='energy_customers', - field=models.CharField(blank=True, default=None, help_text="List any wholesale energy customers that take energy from the development. E.g. 'national grids' or private energy suppliers.", max_length=120, null=True, verbose_name='Energy consumers'), + model_name="casestudy", + name="energy_customers", + field=models.CharField( + blank=True, + default=None, + help_text="List any wholesale energy customers that take energy from the development. E.g. 'national grids' or private energy suppliers.", + max_length=120, + null=True, + verbose_name="Energy consumers", + ), ), migrations.AlterField( - model_name='casestudy', - name='entry_name', - field=models.CharField(help_text='Enter the name of the entry. This should usually be the name of project.', max_length=128, verbose_name='Entry Name'), + model_name="casestudy", + name="entry_name", + field=models.CharField( + help_text="Enter the name of the entry. This should usually be the name of project.", + max_length=128, + verbose_name="Entry Name", + ), ), migrations.AlterField( - model_name='casestudy', - name='full_description', - field=models.TextField(help_text='Describe the project in full. Separate paragraphs with a new line Please add as much detail as you feel is necessary here.', verbose_name='Full Description'), + model_name="casestudy", + name="full_description", + field=models.TextField( + help_text="Describe the project in full. Separate paragraphs with a new line Please add as much detail as you feel is necessary here.", + verbose_name="Full Description", + ), ), migrations.AlterField( - model_name='casestudy', - name='generation_technology', - field=models.CharField(blank=True, choices=[('Wind energy', (('SSWE', 'Small-scale (less than 500kW)'), ('LSWE', 'Large-scale (more than 500kW)'))), ('Photovoltaic electricity', (('SSPV', 'Small-scale (less than 500kW)'), ('LSPV', 'Large-scale (more than 500kW)'))), ('Hydroelectric', (('SHYD', 'Small-scale (less than 1MW)'), ('MHYD', 'Medium-scale (between 1-20MW)'), ('LHYD', 'Large-scale (more than 20MW - often not considered renewable)'))), ('STHE', 'Solar thermal electricity (e.g using parabolic reflectors)'), ('GEOT', 'Geothermal electricity'), ('BIOG', 'Biogas turbine'), ('OTHB', 'Other biomass (including liquid/solid biofuel)'), ('OTHR', 'Other (tidal, wave etc)')], default=None, help_text='Select the type of renewable energy generation that most applies to this case study.', max_length=4, null=True, verbose_name='Generation technology'), + model_name="casestudy", + name="generation_technology", + field=models.CharField( + blank=True, + choices=[ + ( + "Wind energy", + ( + ("SSWE", "Small-scale (less than 500kW)"), + ("LSWE", "Large-scale (more than 500kW)"), + ), + ), + ( + "Photovoltaic electricity", + ( + ("SSPV", "Small-scale (less than 500kW)"), + ("LSPV", "Large-scale (more than 500kW)"), + ), + ), + ( + "Hydroelectric", + ( + ("SHYD", "Small-scale (less than 1MW)"), + ("MHYD", "Medium-scale (between 1-20MW)"), + ( + "LHYD", + "Large-scale (more than 20MW - often not considered renewable)", + ), + ), + ), + ( + "STHE", + "Solar thermal electricity (e.g using parabolic reflectors)", + ), + ("GEOT", "Geothermal electricity"), + ("BIOG", "Biogas turbine"), + ("OTHB", "Other biomass (including liquid/solid biofuel)"), + ("OTHR", "Other (tidal, wave etc)"), + ], + default=None, + help_text="Select the type of renewable energy generation that most applies to this case study.", + max_length=4, + null=True, + verbose_name="Generation technology", + ), ), migrations.AlterField( - model_name='casestudy', - name='generation_technology_other', - field=models.CharField(blank=True, default=None, help_text='If you selected other, please specify the generation technology (e.g. tidal, wave etc)', max_length=200, null=True, verbose_name='Other generation type'), + model_name="casestudy", + name="generation_technology_other", + field=models.CharField( + blank=True, + default=None, + help_text="If you selected other, please specify the generation technology (e.g. tidal, wave etc)", + max_length=200, + null=True, + verbose_name="Other generation type", + ), ), migrations.AlterField( - model_name='casestudy', - name='land_ownership', - field=models.CharField(choices=[('PRI', 'Private Land'), ('PUB', 'Public Land'), ('COM', 'Community Land'), ('OTH', 'Other')], help_text='What type of ownership does the land fall under?', max_length=3, verbose_name='Land ownership'), + model_name="casestudy", + name="land_ownership", + field=models.CharField( + choices=[ + ("PRI", "Private Land"), + ("PUB", "Public Land"), + ("COM", "Community Land"), + ("OTH", "Other"), + ], + help_text="What type of ownership does the land fall under?", + max_length=3, + verbose_name="Land ownership", + ), ), migrations.AlterField( - model_name='casestudy', - name='land_ownership_details', - field=models.CharField(blank=True, help_text="Please specify details about land ownership if you chose 'other'", max_length=256, null=True, verbose_name='Land ownership details'), + model_name="casestudy", + name="land_ownership_details", + field=models.CharField( + blank=True, + help_text="Please specify details about land ownership if you chose 'other'", + max_length=256, + null=True, + verbose_name="Land ownership details", + ), ), migrations.AlterField( - model_name='casestudy', - name='location', - field=django.contrib.gis.db.models.fields.PointField(help_text='Place a marker using the tools on the left of the map. Zoom in as far as you can so the placement is accurate (important)', srid=4326, verbose_name='Project location'), + model_name="casestudy", + name="location", + field=django.contrib.gis.db.models.fields.PointField( + help_text="Place a marker using the tools on the left of the map. Zoom in as far as you can so the placement is accurate (important)", + srid=4326, + verbose_name="Project location", + ), ), migrations.AlterField( - model_name='casestudy', - name='power_technology', - field=models.CharField(blank=True, choices=[('PT', 'Power transmission (grid lines, substations etc)'), ('ES', 'Energy storage (pumped storage, compressed air, battery systems etc'), ('OT', 'Others')], default=None, help_text='Select the related energy technology.', max_length=2, null=True, verbose_name='Power technology'), + model_name="casestudy", + name="power_technology", + field=models.CharField( + blank=True, + choices=[ + ("PT", "Power transmission (grid lines, substations etc)"), + ( + "ES", + "Energy storage (pumped storage, compressed air, battery systems etc", + ), + ("OT", "Others"), + ], + default=None, + help_text="Select the related energy technology.", + max_length=2, + null=True, + verbose_name="Power technology", + ), ), migrations.AlterField( - model_name='casestudy', - name='project_status', - field=models.CharField(choices=[('EXSTNG', 'Existing Project'), ('UCONST', 'Under Construction'), ('PROJCD', 'Projected Project')], help_text='What is the status of the current project?', max_length=6, verbose_name='Status of Project'), + model_name="casestudy", + name="project_status", + field=models.CharField( + choices=[ + ("EXSTNG", "Existing Project"), + ("UCONST", "Under Construction"), + ("PROJCD", "Projected Project"), + ], + help_text="What is the status of the current project?", + max_length=6, + verbose_name="Status of Project", + ), ), migrations.AlterField( - model_name='casestudy', - name='sector_of_economy', - field=models.CharField(choices=[('RN', 'Renewable Energy Generation'), ('PG', 'Power Grids'), ('SM', 'Supply of Minerals')], help_text='Which sector of the renewable energy economy is most relevant?', max_length=3, verbose_name='Sector of economy'), + model_name="casestudy", + name="sector_of_economy", + field=models.CharField( + choices=[ + ("RN", "Renewable Energy Generation"), + ("PG", "Power Grids"), + ("SM", "Supply of Minerals"), + ], + help_text="Which sector of the renewable energy economy is most relevant?", + max_length=3, + verbose_name="Sector of economy", + ), ), migrations.AlterField( - model_name='casestudy', - name='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')], default=None, help_text='Select the most relevant type(s).', max_length=56, null=True, verbose_name='Type(s) of ecosystem'), + 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"), + ], + default=None, + help_text="Select the most relevant type(s).", + max_length=56, + null=True, + verbose_name="Type(s) of ecosystem", + ), ), ] diff --git a/apps/map/migrations/0053_casestudydraft.py b/apps/map/migrations/0053_casestudydraft.py index 3bcf815..0b0a930 100644 --- a/apps/map/migrations/0053_casestudydraft.py +++ b/apps/map/migrations/0053_casestudydraft.py @@ -11,16 +11,31 @@ class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), - ('map', '0052_auto_20180412_0647'), + ("map", "0052_auto_20180412_0647"), ] operations = [ migrations.CreateModel( - name='CaseStudyDraft', + name="CaseStudyDraft", fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('data', models.TextField()), - ('author', models.ForeignKey(editable=False, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), + ( + "id", + models.AutoField( + auto_created=True, + primary_key=True, + serialize=False, + verbose_name="ID", + ), + ), + ("data", models.TextField()), + ( + "author", + models.ForeignKey( + editable=False, + on_delete=django.db.models.deletion.CASCADE, + to=settings.AUTH_USER_MODEL, + ), + ), ], - ), + ) ] diff --git a/apps/map/migrations/0054_auto_20180416_0355.py b/apps/map/migrations/0054_auto_20180416_0355.py index ac30e6b..08d1a44 100644 --- a/apps/map/migrations/0054_auto_20180416_0355.py +++ b/apps/map/migrations/0054_auto_20180416_0355.py @@ -10,36 +10,42 @@ import django.db.models.deletion class Migration(migrations.Migration): - dependencies = [ - ('gis', '__first__'), - ('map', '0053_casestudydraft'), - ] + dependencies = [("gis", "__first__"), ("map", "0053_casestudydraft")] operations = [ migrations.CreateModel( - name='SpatialRefSys', - fields=[ - ], + name="SpatialRefSys", + fields=[], options={ - 'verbose_name': 'spatial reference system', - 'proxy': True, - 'indexes': [], + "verbose_name": "spatial reference system", + "proxy": True, + "indexes": [], }, - bases=('gis.postgisspatialrefsys',), + bases=("gis.postgisspatialrefsys",), ), migrations.AlterField( - model_name='casestudy', - name='coordinate_reference_system', - field=models.ForeignKey(blank=True, default=4326, null=True, on_delete=django.db.models.deletion.CASCADE, to='map.SpatialRefSys'), + model_name="casestudy", + name="coordinate_reference_system", + field=models.ForeignKey( + blank=True, + default=4326, + null=True, + on_delete=django.db.models.deletion.CASCADE, + to="map.SpatialRefSys", + ), ), migrations.AlterField( - model_name='casestudy', - name='location', - field=django.contrib.gis.db.models.fields.PointField(srid=4326, verbose_name='Project location'), + model_name="casestudy", + name="location", + field=django.contrib.gis.db.models.fields.PointField( + srid=4326, verbose_name="Project location" + ), ), migrations.AlterField( - model_name='casestudydraft', - name='author', - field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL), + model_name="casestudydraft", + name="author", + field=models.ForeignKey( + on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL + ), ), ] diff --git a/apps/map/migrations/0055_auto_20180419_1650.py b/apps/map/migrations/0055_auto_20180419_1650.py index 1c1368a..7fec4b9 100644 --- a/apps/map/migrations/0055_auto_20180419_1650.py +++ b/apps/map/migrations/0055_auto_20180419_1650.py @@ -8,74 +8,214 @@ import multiselectfield.db.fields class Migration(migrations.Migration): - dependencies = [ - ('map', '0054_auto_20180416_0355'), - ] + dependencies = [("map", "0054_auto_20180416_0355")] operations = [ migrations.AlterField( - model_name='casestudy', - name='biomass_detail', - field=models.CharField(blank=True, default=None, help_text='If you selected biogas or biomass, please describe the feedstock (where the fuel came from e.g. corn, algae, anaerobic digestion, commercial waste etc.)', max_length=200, null=True, verbose_name='Description of feedstock'), + model_name="casestudy", + name="biomass_detail", + field=models.CharField( + blank=True, + default=None, + help_text="If you selected biogas or biomass, please describe the feedstock (where the fuel came from e.g. corn, algae, anaerobic digestion, commercial waste etc.)", + max_length=200, + null=True, + verbose_name="Description of feedstock", + ), ), migrations.AlterField( - model_name='casestudy', - name='community_voices', - field=models.TextField(blank=True, default=None, help_text='Add any direct quotes from members of the community that relate to this project', null=True, verbose_name='Community voices'), + model_name="casestudy", + name="community_voices", + field=models.TextField( + blank=True, + default=None, + help_text="Add any direct quotes from members of the community that relate to this project", + null=True, + verbose_name="Community voices", + ), ), migrations.AlterField( - model_name='casestudy', - name='energy_customers', - field=models.CharField(blank=True, default=None, help_text="List any wholesale customers that take energy from the development. E.g. 'national grids' or private energy suppliers.", max_length=120, null=True, verbose_name='Energy consumers'), + model_name="casestudy", + name="energy_customers", + field=models.CharField( + blank=True, + default=None, + help_text="List any wholesale customers that take energy from the development. E.g. 'national grids' or private energy suppliers.", + max_length=120, + null=True, + verbose_name="Energy consumers", + ), ), migrations.AlterField( - model_name='casestudy', - name='entry_name', - field=models.CharField(help_text='Enter the name of the entry. This should usually be the name of the project.', max_length=128, verbose_name='Name'), + model_name="casestudy", + name="entry_name", + field=models.CharField( + help_text="Enter the name of the entry. This should usually be the name of the project.", + max_length=128, + verbose_name="Name", + ), ), migrations.AlterField( - model_name='casestudy', - name='full_description', - field=models.TextField(help_text='Describe the project in full. Separate paragraphs with a new line Please add as much detail as you feel is necessary here.', verbose_name='Full description'), + model_name="casestudy", + name="full_description", + field=models.TextField( + help_text="Describe the project in full. Separate paragraphs with a new line Please add as much detail as you feel is necessary here.", + verbose_name="Full description", + ), ), migrations.AlterField( - model_name='casestudy', - name='generation_technology', - field=models.CharField(blank=True, choices=[('Wind energy', (('SSWE', 'Small-scale (less than 500 kW)'), ('LSWE', 'Large-scale (more than 500kW)'))), ('Photovoltaic electricity', (('SSPV', 'Small-scale (less than 500 kW)'), ('LSPV', 'Large-scale (more than 500kW)'))), ('Hydroelectric', (('SHYD', 'Small-scale (less than 1MW)'), ('MHYD', 'Medium-scale (between 1-20MW)'), ('LHYD', 'Large-scale (more than 20MW - often not considered renewable)'))), ('STHE', 'Solar thermal electricity (e.g. using parabolic reflectors)'), ('GEOT', 'Geothermal electricity'), ('BIOG', 'Biogas turbine'), ('OTHB', 'Other biomass (including liquid/solid biofuel)'), ('OTHR', 'Other (tidal, wave etc.)')], default=None, help_text='Select the type of renewable energy generation that most applies to this case study.', max_length=4, null=True, verbose_name='Generation technology'), + model_name="casestudy", + name="generation_technology", + field=models.CharField( + blank=True, + choices=[ + ( + "Wind energy", + ( + ("SSWE", "Small-scale (less than 500 kW)"), + ("LSWE", "Large-scale (more than 500kW)"), + ), + ), + ( + "Photovoltaic electricity", + ( + ("SSPV", "Small-scale (less than 500 kW)"), + ("LSPV", "Large-scale (more than 500kW)"), + ), + ), + ( + "Hydroelectric", + ( + ("SHYD", "Small-scale (less than 1MW)"), + ("MHYD", "Medium-scale (between 1-20MW)"), + ( + "LHYD", + "Large-scale (more than 20MW - often not considered renewable)", + ), + ), + ), + ( + "STHE", + "Solar thermal electricity (e.g. using parabolic reflectors)", + ), + ("GEOT", "Geothermal electricity"), + ("BIOG", "Biogas turbine"), + ("OTHB", "Other biomass (including liquid/solid biofuel)"), + ("OTHR", "Other (tidal, wave etc.)"), + ], + default=None, + help_text="Select the type of renewable energy generation that most applies to this case study.", + max_length=4, + null=True, + verbose_name="Generation technology", + ), ), migrations.AlterField( - model_name='casestudy', - name='generation_technology_other', - field=models.CharField(blank=True, default=None, help_text='If you selected other, please specify the generation technology (e.g. tidal, wave etc.)', max_length=200, null=True, verbose_name='Other generation type'), + model_name="casestudy", + name="generation_technology_other", + field=models.CharField( + blank=True, + default=None, + help_text="If you selected other, please specify the generation technology (e.g. tidal, wave etc.)", + max_length=200, + null=True, + verbose_name="Other generation type", + ), ), migrations.AlterField( - model_name='casestudy', - name='land_ownership', - field=models.CharField(choices=[('PRI', 'Private land'), ('PUB', 'Public land'), ('COM', 'Community land'), ('OTH', 'Other')], help_text='What type of ownership/tenure does the land fall under?', max_length=3, verbose_name='Land ownership/tenure'), + model_name="casestudy", + name="land_ownership", + field=models.CharField( + choices=[ + ("PRI", "Private land"), + ("PUB", "Public land"), + ("COM", "Community land"), + ("OTH", "Other"), + ], + help_text="What type of ownership/tenure does the land fall under?", + max_length=3, + verbose_name="Land ownership/tenure", + ), ), migrations.AlterField( - model_name='casestudy', - name='land_ownership_details', - field=models.CharField(blank=True, help_text="Please specify details about land ownership if you chose 'other'", max_length=256, null=True, verbose_name='Land ownership/tenure details'), + model_name="casestudy", + name="land_ownership_details", + field=models.CharField( + blank=True, + help_text="Please specify details about land ownership if you chose 'other'", + max_length=256, + null=True, + verbose_name="Land ownership/tenure details", + ), ), migrations.AlterField( - model_name='casestudy', - name='power_technology', - field=models.CharField(blank=True, choices=[('PT', 'Power transmission (power lines, substations etc.)'), ('ES', 'Energy storage (pumped storage, compressed air, battery systems etc.)'), ('OT', 'Others')], default=None, help_text='Select the related energy technology.', max_length=2, null=True, verbose_name='Power technology'), + model_name="casestudy", + name="power_technology", + field=models.CharField( + blank=True, + choices=[ + ("PT", "Power transmission (power lines, substations etc.)"), + ( + "ES", + "Energy storage (pumped storage, compressed air, battery systems etc.)", + ), + ("OT", "Others"), + ], + default=None, + help_text="Select the related energy technology.", + max_length=2, + null=True, + verbose_name="Power technology", + ), ), migrations.AlterField( - model_name='casestudy', - name='project_status', - field=models.CharField(choices=[('EXSTNG', 'Existing project'), ('UCONST', 'Under construction'), ('PROJCD', 'Planned project')], help_text='What is the current status of the project?', max_length=6, verbose_name='Status of project'), + model_name="casestudy", + name="project_status", + field=models.CharField( + choices=[ + ("EXSTNG", "Existing project"), + ("UCONST", "Under construction"), + ("PROJCD", "Planned project"), + ], + help_text="What is the current status of the project?", + max_length=6, + verbose_name="Status of project", + ), ), migrations.AlterField( - model_name='casestudy', - name='sector_of_economy', - field=models.CharField(choices=[('RN', 'Renewable energy generation'), ('PG', 'Power grids'), ('SM', 'Supply of minerals')], help_text='Which sector of the renewable energy economy is most relevant?', max_length=3, verbose_name='Sector of the renewable energy economy'), + model_name="casestudy", + name="sector_of_economy", + field=models.CharField( + choices=[ + ("RN", "Renewable energy generation"), + ("PG", "Power grids"), + ("SM", "Supply of minerals"), + ], + help_text="Which sector of the renewable energy economy is most relevant?", + max_length=3, + verbose_name="Sector of the renewable energy economy", + ), ), 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')], default=None, help_text='Select the most relevant type(s).', max_length=56, null=True, verbose_name='Type(s) of ecosystem'), + 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"), + ], + default=None, + help_text="Select the most relevant type(s).", + max_length=56, + null=True, + verbose_name="Type(s) of ecosystem", + ), ), ] diff --git a/apps/map/migrations/0056_delete_shapefile.py b/apps/map/migrations/0056_delete_shapefile.py index 99f4ddd..b374d10 100644 --- a/apps/map/migrations/0056_delete_shapefile.py +++ b/apps/map/migrations/0056_delete_shapefile.py @@ -7,12 +7,6 @@ from django.db import migrations class Migration(migrations.Migration): - dependencies = [ - ('map', '0055_auto_20180419_1650'), - ] + dependencies = [("map", "0055_auto_20180419_1650")] - operations = [ - migrations.DeleteModel( - name='Shapefile', - ), - ] + operations = [migrations.DeleteModel(name="Shapefile")] diff --git a/apps/map/migrations/0057_auto_20180423_0220.py b/apps/map/migrations/0057_auto_20180423_0220.py index f2fdcf2..2b7fd9b 100644 --- a/apps/map/migrations/0057_auto_20180423_0220.py +++ b/apps/map/migrations/0057_auto_20180423_0220.py @@ -7,37 +7,48 @@ from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [ - ('files', '0001_initial'), - ('map', '0056_delete_shapefile'), - ] + dependencies = [("files", "0001_initial"), ("map", "0056_delete_shapefile")] operations = [ migrations.RemoveField( - model_name='casestudy', - name='official_project_documents', + model_name="casestudy", name="official_project_documents" ), migrations.AddField( - 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.', null=True, related_name='official_project_document_for', to='files.File', verbose_name='Official project documents'), - ), - migrations.RemoveField( - model_name='casestudy', - name='other_documents', + 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.", + null=True, + related_name="official_project_document_for", + to="files.File", + verbose_name="Official project documents", + ), ), + migrations.RemoveField(model_name="casestudy", name="other_documents"), migrations.AddField( - model_name='casestudy', - name='other_documents', - field=models.ManyToManyField(blank=True, help_text='Attach any other documents that relate to the project.', null=True, related_name='other_document_for', to='files.File', verbose_name='Other documents'), - ), - migrations.RemoveField( - model_name='casestudy', - name='shapefiles', + model_name="casestudy", + name="other_documents", + field=models.ManyToManyField( + blank=True, + help_text="Attach any other documents that relate to the project.", + null=True, + related_name="other_document_for", + to="files.File", + verbose_name="Other documents", + ), ), + migrations.RemoveField(model_name="casestudy", name="shapefiles"), migrations.AddField( - 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', null=True, related_name='shapefile_for', to='files.File', verbose_name='Shapefiles'), + 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", + null=True, + related_name="shapefile_for", + to="files.File", + verbose_name="Shapefiles", + ), ), ] diff --git a/apps/map/migrations/0058_auto_20180429_2205.py b/apps/map/migrations/0058_auto_20180429_2205.py index c85401b..ce1889f 100644 --- a/apps/map/migrations/0058_auto_20180429_2205.py +++ b/apps/map/migrations/0058_auto_20180429_2205.py @@ -7,24 +7,40 @@ from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [ - ('map', '0057_auto_20180423_0220'), - ] + dependencies = [("map", "0057_auto_20180423_0220")] operations = [ 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.', related_name='official_project_document_for', to='files.File', verbose_name='Official project documents'), + 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.", + 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.', related_name='other_document_for', to='files.File', verbose_name='Other documents'), + model_name="casestudy", + name="other_documents", + field=models.ManyToManyField( + blank=True, + help_text="Attach any other documents that relate to the project.", + related_name="other_document_for", + to="files.File", + verbose_name="Other documents", + ), ), 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', related_name='shapefile_for', to='files.File', verbose_name='Shapefiles'), + 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", + related_name="shapefile_for", + to="files.File", + verbose_name="Shapefiles", + ), ), ] diff --git a/apps/map/migrations/0059_auto_20180519_1801.py b/apps/map/migrations/0059_auto_20180519_1801.py index da469a7..b60253c 100644 --- a/apps/map/migrations/0059_auto_20180519_1801.py +++ b/apps/map/migrations/0059_auto_20180519_1801.py @@ -8,99 +8,257 @@ import multiselectfield.db.fields class Migration(migrations.Migration): - dependencies = [ - ('map', '0058_auto_20180429_2205'), - ] + dependencies = [("map", "0058_auto_20180429_2205")] operations = [ migrations.AlterField( - model_name='casestudy', - name='biomass_detail', - field=models.CharField(blank=True, default=None, help_text='If you selected biogas or biomass, please describe the feedstock (where the fuel came from e.g. corn, algae, anaerobic digestion, commercial waste etc)', max_length=200, null=True, verbose_name='Description of feedstock'), + model_name="casestudy", + name="biomass_detail", + field=models.CharField( + blank=True, + default=None, + help_text="If you selected biogas or biomass, please describe the feedstock (where the fuel came from e.g. corn, algae, anaerobic digestion, commercial waste etc)", + max_length=200, + null=True, + verbose_name="Description of feedstock", + ), ), migrations.AlterField( - model_name='casestudy', - name='community_voices', - field=models.TextField(blank=True, default=None, help_text='Add any direct quotes from members of the community that relate to this project', null=True, verbose_name='Community Voices'), + model_name="casestudy", + name="community_voices", + field=models.TextField( + blank=True, + default=None, + help_text="Add any direct quotes from members of the community that relate to this project", + null=True, + verbose_name="Community Voices", + ), ), migrations.AlterField( - model_name='casestudy', - name='energy_customers', - field=models.TextField(blank=True, default='', 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.", verbose_name='Energy consumers'), + model_name="casestudy", + name="energy_customers", + field=models.TextField( + blank=True, + default="", + 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.", + verbose_name="Energy consumers", + ), preserve_default=False, ), migrations.AlterField( - model_name='casestudy', - name='entry_name', - field=models.CharField(help_text='Enter the name of the entry. This should usually be the name of project.', max_length=128, verbose_name='Entry Name'), + model_name="casestudy", + name="entry_name", + field=models.CharField( + help_text="Enter the name of the entry. This should usually be the name of project.", + max_length=128, + verbose_name="Entry Name", + ), ), migrations.AlterField( - model_name='casestudy', - name='full_description', - field=models.TextField(help_text='Describe the project in full. Separate paragraphs with a new line Please add as much detail as you feel is necessary here.', verbose_name='Full Description'), + model_name="casestudy", + name="full_description", + field=models.TextField( + help_text="Describe the project in full. Separate paragraphs with a new line Please add as much detail as you feel is necessary here.", + verbose_name="Full Description", + ), ), migrations.AlterField( - model_name='casestudy', - name='generation_technology', - field=models.CharField(blank=True, choices=[('Wind energy', (('SSWE', 'Small-scale (less than 500kW)'), ('LSWE', 'Large-scale (more than 500kW)'))), ('Photovoltaic electricity', (('SSPV', 'Small-scale (less than 500kW)'), ('LSPV', 'Large-scale (more than 500kW)'))), ('Hydroelectric', (('SHYD', 'Small-scale (less than 1MW)'), ('MHYD', 'Medium-scale (between 1-20MW)'), ('LHYD', 'Large-scale (more than 20MW - often not considered renewable)'))), ('STHE', 'Solar thermal electricity (e.g using parabolic reflectors)'), ('GEOT', 'Geothermal electricity'), ('BIOG', 'Biogas turbine'), ('OTHB', 'Other biomass (including liquid/solid biofuel)'), ('OTHR', 'Other (tidal, wave etc)')], default=None, help_text='Select the type of renewable energy generation that most applies to this case study.', max_length=4, null=True, verbose_name='Generation technology'), + model_name="casestudy", + name="generation_technology", + field=models.CharField( + blank=True, + choices=[ + ( + "Wind energy", + ( + ("SSWE", "Small-scale (less than 500kW)"), + ("LSWE", "Large-scale (more than 500kW)"), + ), + ), + ( + "Photovoltaic electricity", + ( + ("SSPV", "Small-scale (less than 500kW)"), + ("LSPV", "Large-scale (more than 500kW)"), + ), + ), + ( + "Hydroelectric", + ( + ("SHYD", "Small-scale (less than 1MW)"), + ("MHYD", "Medium-scale (between 1-20MW)"), + ( + "LHYD", + "Large-scale (more than 20MW - often not considered renewable)", + ), + ), + ), + ( + "STHE", + "Solar thermal electricity (e.g using parabolic reflectors)", + ), + ("GEOT", "Geothermal electricity"), + ("BIOG", "Biogas turbine"), + ("OTHB", "Other biomass (including liquid/solid biofuel)"), + ("OTHR", "Other (tidal, wave etc)"), + ], + default=None, + help_text="Select the type of renewable energy generation that most applies to this case study.", + max_length=4, + null=True, + verbose_name="Generation technology", + ), ), migrations.AlterField( - model_name='casestudy', - name='generation_technology_other', - field=models.CharField(blank=True, default=None, help_text='If you selected other, please specify the generation technology (e.g. tidal, wave etc)', max_length=200, null=True, verbose_name='Other generation type'), + model_name="casestudy", + name="generation_technology_other", + field=models.CharField( + blank=True, + default=None, + help_text="If you selected other, please specify the generation technology (e.g. tidal, wave etc)", + max_length=200, + null=True, + verbose_name="Other generation type", + ), ), migrations.AlterField( - model_name='casestudy', - name='land_ownership', - field=models.CharField(choices=[('PRI', 'Private Land'), ('PUB', 'Public Land'), ('COM', 'Community Land'), ('OTH', 'Other')], help_text='What type of ownership does the land fall under?', max_length=3, verbose_name='Land ownership'), + model_name="casestudy", + name="land_ownership", + field=models.CharField( + choices=[ + ("PRI", "Private Land"), + ("PUB", "Public Land"), + ("COM", "Community Land"), + ("OTH", "Other"), + ], + help_text="What type of ownership does the land fall under?", + max_length=3, + verbose_name="Land ownership", + ), ), migrations.AlterField( - model_name='casestudy', - name='land_ownership_details', - field=models.CharField(blank=True, help_text="Please specify details about land ownership if you chose 'other'", max_length=256, null=True, verbose_name='Land ownership details'), + model_name="casestudy", + name="land_ownership_details", + field=models.CharField( + blank=True, + help_text="Please specify details about land ownership if you chose 'other'", + max_length=256, + null=True, + verbose_name="Land ownership details", + ), ), migrations.AlterField( - model_name='casestudy', - name='participation_mechanisms', - field=models.TextField(blank=True, default='', help_text='e.g. direct action, local referendums, legal cases, letters or petitions etc', verbose_name='What mechanisms of participation have been used?'), + model_name="casestudy", + name="participation_mechanisms", + field=models.TextField( + blank=True, + default="", + help_text="e.g. direct action, local referendums, legal cases, letters or petitions etc", + verbose_name="What mechanisms of participation have been used?", + ), preserve_default=False, ), migrations.AlterField( - model_name='casestudy', - name='power_technology', - field=models.CharField(blank=True, choices=[('PT', 'Power transmission (grid lines, substations etc)'), ('ES', 'Energy storage (pumped storage, compressed air, battery systems etc'), ('OT', 'Others')], default=None, help_text='Select the related energy technology.', max_length=2, null=True, verbose_name='Power technology'), + model_name="casestudy", + name="power_technology", + field=models.CharField( + blank=True, + choices=[ + ("PT", "Power transmission (grid lines, substations etc)"), + ( + "ES", + "Energy storage (pumped storage, compressed air, battery systems etc", + ), + ("OT", "Others"), + ], + default=None, + help_text="Select the related energy technology.", + max_length=2, + null=True, + verbose_name="Power technology", + ), ), migrations.AlterField( - model_name='casestudy', - name='project_owners', - field=models.TextField(blank=True, default='', help_text='List companies or organisations that own the project and/or facilities. Separate with a new line.', verbose_name='Project and facility owners'), + model_name="casestudy", + name="project_owners", + field=models.TextField( + blank=True, + default="", + help_text="List companies or organisations that own the project and/or facilities. Separate with a new line.", + verbose_name="Project and facility owners", + ), preserve_default=False, ), migrations.AlterField( - model_name='casestudy', - name='project_status', - field=models.CharField(choices=[('EXSTNG', 'Existing Project'), ('UCONST', 'Under Construction'), ('PROJCD', 'Projected Project')], help_text='What is the status of the current project?', max_length=6, verbose_name='Status of Project'), + model_name="casestudy", + name="project_status", + field=models.CharField( + choices=[ + ("EXSTNG", "Existing Project"), + ("UCONST", "Under Construction"), + ("PROJCD", "Projected Project"), + ], + help_text="What is the status of the current project?", + max_length=6, + verbose_name="Status of Project", + ), ), migrations.AlterField( - model_name='casestudy', - name='sector_of_economy', - field=models.CharField(choices=[('RN', 'Renewable Energy Generation'), ('PG', 'Power Grids'), ('SM', 'Supply of Minerals')], help_text='Which sector of the renewable energy economy is most relevant?', max_length=3, verbose_name='Sector of economy'), + model_name="casestudy", + name="sector_of_economy", + field=models.CharField( + choices=[ + ("RN", "Renewable Energy Generation"), + ("PG", "Power Grids"), + ("SM", "Supply of Minerals"), + ], + help_text="Which sector of the renewable energy economy is most relevant?", + max_length=3, + verbose_name="Sector of economy", + ), ), migrations.AlterField( - model_name='casestudy', - name='shareholders', - field=models.TextField(blank=True, default='', help_text="List shareholders of the project owners you've just listed. Separate with a new line.", verbose_name='Shareholders of the project owners'), + model_name="casestudy", + name="shareholders", + field=models.TextField( + blank=True, + default="", + help_text="List shareholders of the project owners you've just listed. Separate with a new line.", + verbose_name="Shareholders of the project owners", + ), preserve_default=False, ), migrations.AlterField( - model_name='casestudy', - name='technical_or_economic_details', - field=models.TextField(blank=True, default='', help_text='Specify any additional technical or economic details relating to the project.', verbose_name='Additional technical or economic details'), + model_name="casestudy", + name="technical_or_economic_details", + field=models.TextField( + blank=True, + default="", + help_text="Specify any additional technical or economic details relating to the project.", + verbose_name="Additional technical or economic details", + ), preserve_default=False, ), 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')], default=None, help_text='Select the most relevant type(s).', max_length=56, null=True, verbose_name='Type(s) of ecosystem'), + 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"), + ], + default=None, + help_text="Select the most relevant type(s).", + max_length=56, + null=True, + verbose_name="Type(s) of ecosystem", + ), ), ] diff --git a/apps/map/migrations/0060_project_life_span_null.py b/apps/map/migrations/0060_project_life_span_null.py index 88956c2..57f4443 100644 --- a/apps/map/migrations/0060_project_life_span_null.py +++ b/apps/map/migrations/0060_project_life_span_null.py @@ -6,18 +6,12 @@ from django.db import migrations def null_life_span(apps, schema_editor): - CaseStudy = apps.get_model('map', 'CaseStudy') - CaseStudy.objects.filter(project_life_span=None).update( - project_life_span='' - ) + CaseStudy = apps.get_model("map", "CaseStudy") + CaseStudy.objects.filter(project_life_span=None).update(project_life_span="") class Migration(migrations.Migration): - dependencies = [ - ('map', '0059_auto_20180519_1801'), - ] + dependencies = [("map", "0059_auto_20180519_1801")] - operations = [ - migrations.RunPython(null_life_span), - ] + operations = [migrations.RunPython(null_life_span)] diff --git a/apps/map/migrations/0061_auto_20180523_1659.py b/apps/map/migrations/0061_auto_20180523_1659.py index 5fc77e1..9667a48 100644 --- a/apps/map/migrations/0061_auto_20180523_1659.py +++ b/apps/map/migrations/0061_auto_20180523_1659.py @@ -7,14 +7,17 @@ from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [ - ('map', '0060_project_life_span_null'), - ] + dependencies = [("map", "0060_project_life_span_null")] operations = [ migrations.AlterField( - model_name='casestudy', - name='project_life_span', - field=models.CharField(blank=True, help_text='e.g. 12 years of production, 15 years overall', max_length=200, verbose_name='Project life span'), - ), + model_name="casestudy", + name="project_life_span", + field=models.CharField( + blank=True, + help_text="e.g. 12 years of production, 15 years overall", + max_length=200, + verbose_name="Project life span", + ), + ) ] diff --git a/apps/map/migrations/0062_auto_20180525_0035.py b/apps/map/migrations/0062_auto_20180525_0035.py index 6698e9c..61be8a7 100644 --- a/apps/map/migrations/0062_auto_20180525_0035.py +++ b/apps/map/migrations/0062_auto_20180525_0035.py @@ -8,69 +8,202 @@ import multiselectfield.db.fields class Migration(migrations.Migration): - dependencies = [ - ('map', '0061_auto_20180523_1659'), - ] + dependencies = [("map", "0061_auto_20180523_1659")] operations = [ migrations.AlterField( - model_name='casestudy', - name='biomass_detail', - field=models.CharField(blank=True, default=None, help_text='If you selected biogas or biomass, please describe the feedstock (where the fuel came from e.g. corn, algae, anaerobic digestion, commercial waste etc.)', max_length=200, null=True, verbose_name='Description of feedstock'), + model_name="casestudy", + name="biomass_detail", + field=models.CharField( + blank=True, + default=None, + help_text="If you selected biogas or biomass, please describe the feedstock (where the fuel came from e.g. corn, algae, anaerobic digestion, commercial waste etc.)", + max_length=200, + null=True, + verbose_name="Description of feedstock", + ), ), migrations.AlterField( - model_name='casestudy', - name='community_voices', - field=models.TextField(blank=True, default=None, help_text='Add any direct quotes from members of the community that relate to this project', null=True, verbose_name='Community voices'), + model_name="casestudy", + name="community_voices", + field=models.TextField( + blank=True, + default=None, + help_text="Add any direct quotes from members of the community that relate to this project", + null=True, + verbose_name="Community voices", + ), ), migrations.AlterField( - model_name='casestudy', - name='entry_name', - field=models.CharField(help_text='Enter the name of the entry. This should usually be the name of the project.', max_length=128, verbose_name='Name'), + model_name="casestudy", + name="entry_name", + field=models.CharField( + help_text="Enter the name of the entry. This should usually be the name of the project.", + max_length=128, + verbose_name="Name", + ), ), migrations.AlterField( - model_name='casestudy', - name='full_description', - field=models.TextField(help_text='Describe the project in full. Separate paragraphs with a new line Please add as much detail as you feel is necessary here.', verbose_name='Full description'), + model_name="casestudy", + name="full_description", + field=models.TextField( + help_text="Describe the project in full. Separate paragraphs with a new line Please add as much detail as you feel is necessary here.", + verbose_name="Full description", + ), ), migrations.AlterField( - model_name='casestudy', - name='generation_technology', - field=models.CharField(blank=True, choices=[('Wind energy', (('SSWE', 'Small-scale (less than 500 kW)'), ('LSWE', 'Large-scale (more than 500kW)'))), ('Photovoltaic electricity', (('SSPV', 'Small-scale (less than 500 kW)'), ('LSPV', 'Large-scale (more than 500kW)'))), ('Hydroelectric', (('SHYD', 'Small-scale (less than 1MW)'), ('MHYD', 'Medium-scale (between 1-20MW)'), ('LHYD', 'Large-scale (more than 20MW - often not considered renewable)'))), ('STHE', 'Solar thermal electricity (e.g. using parabolic reflectors)'), ('GEOT', 'Geothermal electricity'), ('BIOG', 'Biogas turbine'), ('OTHB', 'Other biomass (including liquid/solid biofuel)'), ('OTHR', 'Other (tidal, wave etc.)')], default=None, help_text='Select the type of renewable energy generation that most applies to this case study.', max_length=4, null=True, verbose_name='Generation technology'), + model_name="casestudy", + name="generation_technology", + field=models.CharField( + blank=True, + choices=[ + ( + "Wind energy", + ( + ("SSWE", "Small-scale (less than 500 kW)"), + ("LSWE", "Large-scale (more than 500kW)"), + ), + ), + ( + "Photovoltaic electricity", + ( + ("SSPV", "Small-scale (less than 500 kW)"), + ("LSPV", "Large-scale (more than 500kW)"), + ), + ), + ( + "Hydroelectric", + ( + ("SHYD", "Small-scale (less than 1MW)"), + ("MHYD", "Medium-scale (between 1-20MW)"), + ( + "LHYD", + "Large-scale (more than 20MW - often not considered renewable)", + ), + ), + ), + ( + "STHE", + "Solar thermal electricity (e.g. using parabolic reflectors)", + ), + ("GEOT", "Geothermal electricity"), + ("BIOG", "Biogas turbine"), + ("OTHB", "Other biomass (including liquid/solid biofuel)"), + ("OTHR", "Other (tidal, wave etc.)"), + ], + default=None, + help_text="Select the type of renewable energy generation that most applies to this case study.", + max_length=4, + null=True, + verbose_name="Generation technology", + ), ), migrations.AlterField( - model_name='casestudy', - name='generation_technology_other', - field=models.CharField(blank=True, default=None, help_text='If you selected other, please specify the generation technology (e.g. tidal, wave etc.)', max_length=200, null=True, verbose_name='Other generation type'), + model_name="casestudy", + name="generation_technology_other", + field=models.CharField( + blank=True, + default=None, + help_text="If you selected other, please specify the generation technology (e.g. tidal, wave etc.)", + max_length=200, + null=True, + verbose_name="Other generation type", + ), ), migrations.AlterField( - model_name='casestudy', - name='land_ownership', - field=models.CharField(choices=[('PRI', 'Private land'), ('PUB', 'Public land'), ('COM', 'Community land'), ('OTH', 'Other')], help_text='What type of ownership/tenure does the land fall under?', max_length=3, verbose_name='Land ownership/tenure'), + model_name="casestudy", + name="land_ownership", + field=models.CharField( + choices=[ + ("PRI", "Private land"), + ("PUB", "Public land"), + ("COM", "Community land"), + ("OTH", "Other"), + ], + help_text="What type of ownership/tenure does the land fall under?", + max_length=3, + verbose_name="Land ownership/tenure", + ), ), migrations.AlterField( - model_name='casestudy', - name='land_ownership_details', - field=models.CharField(blank=True, help_text="Please specify details about land ownership if you chose 'other'", max_length=256, null=True, verbose_name='Land ownership/tenure details'), + model_name="casestudy", + name="land_ownership_details", + field=models.CharField( + blank=True, + help_text="Please specify details about land ownership if you chose 'other'", + max_length=256, + null=True, + verbose_name="Land ownership/tenure details", + ), ), migrations.AlterField( - model_name='casestudy', - name='power_technology', - field=models.CharField(blank=True, choices=[('PT', 'Power transmission (power lines, substations etc.)'), ('ES', 'Energy storage (pumped storage, compressed air, battery systems etc.)'), ('OT', 'Others')], default=None, help_text='Select the related energy technology.', max_length=2, null=True, verbose_name='Power technology'), + model_name="casestudy", + name="power_technology", + field=models.CharField( + blank=True, + choices=[ + ("PT", "Power transmission (power lines, substations etc.)"), + ( + "ES", + "Energy storage (pumped storage, compressed air, battery systems etc.)", + ), + ("OT", "Others"), + ], + default=None, + help_text="Select the related energy technology.", + max_length=2, + null=True, + verbose_name="Power technology", + ), ), migrations.AlterField( - model_name='casestudy', - name='project_status', - field=models.CharField(choices=[('EXSTNG', 'Existing project'), ('UCONST', 'Under construction'), ('PROJCD', 'Planned project')], help_text='What is the current status of the project?', max_length=6, verbose_name='Status of project'), + model_name="casestudy", + name="project_status", + field=models.CharField( + choices=[ + ("EXSTNG", "Existing project"), + ("UCONST", "Under construction"), + ("PROJCD", "Planned project"), + ], + help_text="What is the current status of the project?", + max_length=6, + verbose_name="Status of project", + ), ), migrations.AlterField( - model_name='casestudy', - name='sector_of_economy', - field=models.CharField(choices=[('RN', 'Renewable energy generation'), ('PG', 'Power grids'), ('SM', 'Supply of minerals')], help_text='Which sector of the renewable energy economy is most relevant?', max_length=3, verbose_name='Sector of the renewable energy economy'), + model_name="casestudy", + name="sector_of_economy", + field=models.CharField( + choices=[ + ("RN", "Renewable energy generation"), + ("PG", "Power grids"), + ("SM", "Supply of minerals"), + ], + help_text="Which sector of the renewable energy economy is most relevant?", + max_length=3, + verbose_name="Sector of the renewable energy economy", + ), ), 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')], default=None, help_text='Select the most relevant type(s).', max_length=56, null=True, verbose_name='Type(s) of ecosystem'), + 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"), + ], + default=None, + help_text="Select the most relevant type(s).", + max_length=56, + null=True, + verbose_name="Type(s) of ecosystem", + ), ), ] diff --git a/apps/map/migrations/0063_auto_20180525_0052.py b/apps/map/migrations/0063_auto_20180525_0052.py index 0ef81b5..5924895 100644 --- a/apps/map/migrations/0063_auto_20180525_0052.py +++ b/apps/map/migrations/0063_auto_20180525_0052.py @@ -7,19 +7,25 @@ from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [ - ('map', '0062_auto_20180525_0035'), - ] + dependencies = [("map", "0062_auto_20180525_0035")] operations = [ migrations.AlterField( - model_name='casestudy', - name='key_actors_involved', - field=models.TextField(blank=True, null=True, verbose_name='Key actors involved (individual/organisational)'), + model_name="casestudy", + name="key_actors_involved", + field=models.TextField( + blank=True, + null=True, + verbose_name="Key actors involved (individual/organisational)", + ), ), migrations.AlterField( - model_name='casestudy', - name='who_has_been_involved', - field=models.TextField(blank=True, null=True, verbose_name='Which communities, groups and organisations have been involved?'), + model_name="casestudy", + name="who_has_been_involved", + field=models.TextField( + blank=True, + null=True, + verbose_name="Which communities, groups and organisations have been involved?", + ), ), ] diff --git a/apps/map/migrations/0064_auto_20180526_1536.py b/apps/map/migrations/0064_auto_20180526_1536.py index ec25f7a..f5eb68f 100644 --- a/apps/map/migrations/0064_auto_20180526_1536.py +++ b/apps/map/migrations/0064_auto_20180526_1536.py @@ -7,14 +7,18 @@ from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [ - ('map', '0063_auto_20180525_0052'), - ] + dependencies = [("map", "0063_auto_20180525_0052")] operations = [ migrations.AlterField( - model_name='casestudy', - name='land_ownership_details', - field=models.CharField(blank=True, help_text='Please specify details about land ownership', max_length=256, null=True, verbose_name='Land ownership/tenure details'), - ), + model_name="casestudy", + name="land_ownership_details", + field=models.CharField( + blank=True, + help_text="Please specify details about land ownership", + max_length=256, + null=True, + verbose_name="Land ownership/tenure details", + ), + ) ] diff --git a/apps/map/migrations/0065_casestudy_images.py b/apps/map/migrations/0065_casestudy_images.py index 4051a88..7ccbae0 100644 --- a/apps/map/migrations/0065_casestudy_images.py +++ b/apps/map/migrations/0065_casestudy_images.py @@ -8,14 +8,19 @@ from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ - ('files', '0003_auto_20180526_1547'), - ('map', '0064_auto_20180526_1536'), + ("files", "0003_auto_20180526_1547"), + ("map", "0064_auto_20180526_1536"), ] operations = [ migrations.AddField( - model_name='casestudy', - name='images', - field=models.ManyToManyField(blank=True, related_name='image_for', to='files.ImageFile', verbose_name='Images'), - ), + model_name="casestudy", + name="images", + field=models.ManyToManyField( + blank=True, + related_name="image_for", + to="files.ImageFile", + verbose_name="Images", + ), + ) ] diff --git a/apps/map/migrations/0066_copy_images_to_imagefiles.py b/apps/map/migrations/0066_copy_images_to_imagefiles.py index a896083..dbd0b76 100644 --- a/apps/map/migrations/0066_copy_images_to_imagefiles.py +++ b/apps/map/migrations/0066_copy_images_to_imagefiles.py @@ -6,20 +6,20 @@ from django.db import migrations def copy_images(apps, schema_editor): - CaseStudy = apps.get_model('map', 'CaseStudy') - ImageFile = apps.get_model('files', 'ImageFile') - User = apps.get_model('auth', 'User') + CaseStudy = apps.get_model("map", "CaseStudy") + ImageFile = apps.get_model("files", "ImageFile") + User = apps.get_model("auth", "User") for case_study in CaseStudy.objects.all(): author = case_study.author if author is None: - author = User.objects.get(username='root') + author = User.objects.get(username="root") imagefile = ImageFile( file=case_study.image, caption=case_study.image_caption, credit=case_study.image_credit, - user=author + user=author, ) imagefile.save() case_study.images.add(imagefile) @@ -27,10 +27,6 @@ def copy_images(apps, schema_editor): class Migration(migrations.Migration): - dependencies = [ - ('map', '0065_casestudy_images'), - ] + dependencies = [("map", "0065_casestudy_images")] - operations = [ - migrations.RunPython(copy_images, migrations.RunPython.noop), - ] + operations = [migrations.RunPython(copy_images, migrations.RunPython.noop)] diff --git a/apps/map/migrations/0067_remove_old_images.py b/apps/map/migrations/0067_remove_old_images.py index 3789202..a4b36d4 100644 --- a/apps/map/migrations/0067_remove_old_images.py +++ b/apps/map/migrations/0067_remove_old_images.py @@ -7,21 +7,10 @@ from django.db import migrations class Migration(migrations.Migration): - dependencies = [ - ('map', '0066_copy_images_to_imagefiles'), - ] + dependencies = [("map", "0066_copy_images_to_imagefiles")] operations = [ - migrations.RemoveField( - model_name='casestudy', - name='image', - ), - migrations.RemoveField( - model_name='casestudy', - name='image_caption', - ), - migrations.RemoveField( - model_name='casestudy', - name='image_credit', - ), + migrations.RemoveField(model_name="casestudy", name="image"), + migrations.RemoveField(model_name="casestudy", name="image_caption"), + migrations.RemoveField(model_name="casestudy", name="image_credit"), ] diff --git a/apps/map/migrations/0068_casestudydraft_created.py b/apps/map/migrations/0068_casestudydraft_created.py index 1310746..2a9e54f 100644 --- a/apps/map/migrations/0068_casestudydraft_created.py +++ b/apps/map/migrations/0068_casestudydraft_created.py @@ -8,15 +8,15 @@ import django.utils.timezone class Migration(migrations.Migration): - dependencies = [ - ('map', '0067_remove_old_images'), - ] + dependencies = [("map", "0067_remove_old_images")] operations = [ migrations.AddField( - model_name='casestudydraft', - name='created', - field=models.DateTimeField(auto_now_add=True, default=django.utils.timezone.now), + model_name="casestudydraft", + name="created", + field=models.DateTimeField( + auto_now_add=True, default=django.utils.timezone.now + ), preserve_default=False, - ), + ) ] diff --git a/apps/map/migrations/0069_remove_null_from_text_fields.py b/apps/map/migrations/0069_remove_null_from_text_fields.py index 737e002..47ea0b4 100644 --- a/apps/map/migrations/0069_remove_null_from_text_fields.py +++ b/apps/map/migrations/0069_remove_null_from_text_fields.py @@ -6,75 +6,72 @@ from django.db import migrations, models import multiselectfield.db.fields string_fields = [ - 'additional_technical_details', - 'associated_infrastructure', - 'biomass_detail', - 'community_voices', - 'contractor_or_supplier_of_technology', - 'direct_comms', - 'entry_name', - 'full_description', - 'generation_equipment_supplier', - 'generation_technology', - 'generation_technology_other', - 'identified_partnerships', - 'isolated_or_widespread', - 'key_actors_involved', - 'land_ownership', - 'land_ownership_details', - 'media_coverage_independent', - 'media_coverage_mainstream', - 'minerals_or_commodities', - 'minerals_or_commodities_other', - 'name_of_territory_or_area', - 'negative_case_reasons', - 'negative_case_reasons_other', - 'negative_socioenvironmental_impacts', - 'obstacles_and_hindrances', - 'positive_case_type', - 'potential_partnerships', - 'power_technology', - 'power_technology_other', - 'project_status', - 'project_status_detail', - 'projected_production_of_commodities', - 'sector_of_economy', - 'size_of_concessions', - 'social_media_links', - 'socioeconomic_benefits', - 'type_of_ecosystem', - 'type_of_extraction', - 'use_in_energy_economy', - 'use_in_energy_economy_other', - 'video_caption', - 'video_credit', - 'when_did_organising_start', - 'who_has_been_involved', + "additional_technical_details", + "associated_infrastructure", + "biomass_detail", + "community_voices", + "contractor_or_supplier_of_technology", + "direct_comms", + "entry_name", + "full_description", + "generation_equipment_supplier", + "generation_technology", + "generation_technology_other", + "identified_partnerships", + "isolated_or_widespread", + "key_actors_involved", + "land_ownership", + "land_ownership_details", + "media_coverage_independent", + "media_coverage_mainstream", + "minerals_or_commodities", + "minerals_or_commodities_other", + "name_of_territory_or_area", + "negative_case_reasons", + "negative_case_reasons_other", + "negative_socioenvironmental_impacts", + "obstacles_and_hindrances", + "positive_case_type", + "potential_partnerships", + "power_technology", + "power_technology_other", + "project_status", + "project_status_detail", + "projected_production_of_commodities", + "sector_of_economy", + "size_of_concessions", + "social_media_links", + "socioeconomic_benefits", + "type_of_ecosystem", + "type_of_extraction", + "use_in_energy_economy", + "use_in_energy_economy_other", + "video_caption", + "video_credit", + "when_did_organising_start", + "who_has_been_involved", ] def remove_nulls(apps, schema_editor): # We can't import the Person model directly as it may be a newer # version than this migration expects. We use the historical version. - CaseStudy = apps.get_model('map', 'CaseStudy') + CaseStudy = apps.get_model("map", "CaseStudy") for study in CaseStudy.objects.all(): for field in string_fields: if getattr(study, field) == None: - setattr(study, field, '') + setattr(study, field, "") try: study.save() except: - from pdb import set_trace; set_trace() + from pdb import set_trace + set_trace() class Migration(migrations.Migration): - dependencies = [ - ('map', '0068_casestudydraft_created'), - ] + dependencies = [("map", "0068_casestudydraft_created")] - operations = [ - migrations.RunPython(remove_nulls, migrations.RunPython.noop), - ] + operations = [migrations.RunPython(remove_nulls, migrations.RunPython.noop)] diff --git a/apps/map/migrations/0070_remove_null_from_text_fields_schema.py b/apps/map/migrations/0070_remove_null_from_text_fields_schema.py index 052f4d1..d5e3e7c 100644 --- a/apps/map/migrations/0070_remove_null_from_text_fields_schema.py +++ b/apps/map/migrations/0070_remove_null_from_text_fields_schema.py @@ -8,259 +8,726 @@ import multiselectfield.db.fields class Migration(migrations.Migration): - dependencies = [ - ('map', '0069_remove_null_from_text_fields'), - ] + dependencies = [("map", "0069_remove_null_from_text_fields")] operations = [ migrations.AlterField( - model_name='casestudy', - name='additional_technical_details', - field=models.CharField(blank=True, help_text='Add any additional details such as: length, from-to, voltage, substations etc', max_length=512, verbose_name='Additional technical or economic details'), + model_name="casestudy", + name="additional_technical_details", + field=models.CharField( + blank=True, + help_text="Add any additional details such as: length, from-to, voltage, substations etc", + max_length=512, + verbose_name="Additional technical or economic details", + ), ), migrations.AlterField( - model_name='casestudy', - name='associated_infrastructure', - field=models.CharField(blank=True, help_text='List any associated infrastructure in the locality (e.g. tailings dams/mine waste storage and treatment facilities; ore processing facilities; smelting facilities; hydroelectric dams/energy infrastructure; transport infrastructure e.g. roads or rail.', max_length=256, verbose_name='Associated infrastructure in the locality'), + model_name="casestudy", + name="associated_infrastructure", + field=models.CharField( + blank=True, + help_text="List any associated infrastructure in the locality (e.g. tailings dams/mine waste storage and treatment facilities; ore processing facilities; smelting facilities; hydroelectric dams/energy infrastructure; transport infrastructure e.g. roads or rail.", + max_length=256, + verbose_name="Associated infrastructure in the locality", + ), ), migrations.AlterField( - model_name='casestudy', - name='biomass_detail', - field=models.CharField(blank=True, help_text='If you selected biogas or biomass, please describe the feedstock (where the fuel came from e.g. corn, algae, anaerobic digestion, commercial waste etc)', max_length=200, verbose_name='Description of feedstock'), + model_name="casestudy", + name="biomass_detail", + field=models.CharField( + blank=True, + help_text="If you selected biogas or biomass, please describe the feedstock (where the fuel came from e.g. corn, algae, anaerobic digestion, commercial waste etc)", + max_length=200, + verbose_name="Description of feedstock", + ), ), migrations.AlterField( - model_name='casestudy', - name='community_voices', - field=models.TextField(blank=True, help_text='Add any direct quotes from members of the community that relate to this project', verbose_name='Community Voices'), + model_name="casestudy", + name="community_voices", + field=models.TextField( + blank=True, + help_text="Add any direct quotes from members of the community that relate to this project", + verbose_name="Community Voices", + ), ), migrations.AlterField( - model_name='casestudy', - name='contractor_or_supplier_of_technology', - field=models.CharField(blank=True, help_text='List companies that act as contractors or suppliers of technology related to energy storage.', max_length=256, verbose_name='Contractor and/or supplier of technology'), + model_name="casestudy", + name="contractor_or_supplier_of_technology", + field=models.CharField( + blank=True, + help_text="List companies that act as contractors or suppliers of technology related to energy storage.", + max_length=256, + verbose_name="Contractor and/or supplier of technology", + ), ), migrations.AlterField( - model_name='casestudy', - name='direct_comms', - field=models.TextField(blank=True, help_text='Add any reports of direct communication between community members and representatives of developers/companies/investors.', verbose_name='Reports of direct communications'), + model_name="casestudy", + name="direct_comms", + field=models.TextField( + blank=True, + help_text="Add any reports of direct communication between community members and representatives of developers/companies/investors.", + verbose_name="Reports of direct communications", + ), ), migrations.AlterField( - model_name='casestudy', - name='discharge_time', - field=models.DecimalField(blank=True, decimal_places=3, help_text='Enter the time it takes to discharge from full capacity at maximum power output (in hours).', max_digits=6, null=True, verbose_name='Time for discharge from full capacity'), + model_name="casestudy", + name="discharge_time", + field=models.DecimalField( + blank=True, + decimal_places=3, + help_text="Enter the time it takes to discharge from full capacity at maximum power output (in hours).", + max_digits=6, + null=True, + verbose_name="Time for discharge from full capacity", + ), ), migrations.AlterField( - model_name='casestudy', - name='energy_storage_capacity', - field=models.DecimalField(blank=True, decimal_places=3, help_text='Enter the total capacity of the energy storage system in kilowatt-hours (kWh).', max_digits=20, null=True, verbose_name='Energy storage capacity'), + model_name="casestudy", + name="energy_storage_capacity", + field=models.DecimalField( + blank=True, + decimal_places=3, + help_text="Enter the total capacity of the energy storage system in kilowatt-hours (kWh).", + max_digits=20, + null=True, + verbose_name="Energy storage capacity", + ), ), migrations.AlterField( - model_name='casestudy', - name='entry_name', - field=models.CharField(help_text='Enter the name of the entry. This should usually be the name of project.', max_length=128, verbose_name='Entry Name'), + model_name="casestudy", + name="entry_name", + field=models.CharField( + help_text="Enter the name of the entry. This should usually be the name of project.", + max_length=128, + verbose_name="Entry Name", + ), ), migrations.AlterField( - model_name='casestudy', - name='full_description', - field=models.TextField(help_text='Describe the project in full. Separate paragraphs with a new line Please add as much detail as you feel is necessary here.', verbose_name='Full Description'), + model_name="casestudy", + name="full_description", + field=models.TextField( + help_text="Describe the project in full. Separate paragraphs with a new line Please add as much detail as you feel is necessary here.", + verbose_name="Full Description", + ), ), migrations.AlterField( - model_name='casestudy', - name='generation_equipment_supplier', - field=models.TextField(blank=True, help_text='Enter the supplier of the generation equipment. (E.g. Siemens)', verbose_name='Generation equipment supplier'), + model_name="casestudy", + name="generation_equipment_supplier", + field=models.TextField( + blank=True, + help_text="Enter the supplier of the generation equipment. (E.g. Siemens)", + verbose_name="Generation equipment supplier", + ), ), migrations.AlterField( - model_name='casestudy', - name='generation_technology', - field=models.CharField(blank=True, choices=[('Wind energy', (('SSWE', 'Small-scale (less than 500kW)'), ('LSWE', 'Large-scale (more than 500kW)'))), ('Photovoltaic electricity', (('SSPV', 'Small-scale (less than 500kW)'), ('LSPV', 'Large-scale (more than 500kW)'))), ('Hydroelectric', (('SHYD', 'Small-scale (less than 1MW)'), ('MHYD', 'Medium-scale (between 1-20MW)'), ('LHYD', 'Large-scale (more than 20MW - often not considered renewable)'))), ('STHE', 'Solar thermal electricity (e.g using parabolic reflectors)'), ('GEOT', 'Geothermal electricity'), ('BIOG', 'Biogas turbine'), ('OTHB', 'Other biomass (including liquid/solid biofuel)'), ('OTHR', 'Other (tidal, wave etc)')], help_text='Select the type of renewable energy generation that most applies to this case study.', max_length=4, verbose_name='Generation technology'), + model_name="casestudy", + name="generation_technology", + field=models.CharField( + blank=True, + choices=[ + ( + "Wind energy", + ( + ("SSWE", "Small-scale (less than 500kW)"), + ("LSWE", "Large-scale (more than 500kW)"), + ), + ), + ( + "Photovoltaic electricity", + ( + ("SSPV", "Small-scale (less than 500kW)"), + ("LSPV", "Large-scale (more than 500kW)"), + ), + ), + ( + "Hydroelectric", + ( + ("SHYD", "Small-scale (less than 1MW)"), + ("MHYD", "Medium-scale (between 1-20MW)"), + ( + "LHYD", + "Large-scale (more than 20MW - often not considered renewable)", + ), + ), + ), + ( + "STHE", + "Solar thermal electricity (e.g using parabolic reflectors)", + ), + ("GEOT", "Geothermal electricity"), + ("BIOG", "Biogas turbine"), + ("OTHB", "Other biomass (including liquid/solid biofuel)"), + ("OTHR", "Other (tidal, wave etc)"), + ], + help_text="Select the type of renewable energy generation that most applies to this case study.", + max_length=4, + verbose_name="Generation technology", + ), ), migrations.AlterField( - model_name='casestudy', - name='generation_technology_other', - field=models.CharField(blank=True, help_text='If you selected other, please specify the generation technology (e.g. tidal, wave etc)', max_length=200, verbose_name='Other generation type'), + model_name="casestudy", + name="generation_technology_other", + field=models.CharField( + blank=True, + help_text="If you selected other, please specify the generation technology (e.g. tidal, wave etc)", + max_length=200, + verbose_name="Other generation type", + ), ), migrations.AlterField( - model_name='casestudy', - name='identified_partnerships', - field=models.CharField(blank=True, help_text='Are you looking for partnerships or have any clearly identified need? If so, please describe it here.', max_length=256, verbose_name='Identified partnerships'), + model_name="casestudy", + name="identified_partnerships", + field=models.CharField( + blank=True, + help_text="Are you looking for partnerships or have any clearly identified need? If so, please describe it here.", + max_length=256, + verbose_name="Identified partnerships", + ), ), migrations.AlterField( - model_name='casestudy', - name='isolated_or_widespread', - field=models.TextField(blank=True, help_text='Is this an isolated project or are there similar projects in the same geographic area? If there are more, can you describe them? Are there any significant cumulative synergistic effects?', verbose_name='Describe if the project is isolated or commonplace.'), + model_name="casestudy", + name="isolated_or_widespread", + field=models.TextField( + blank=True, + help_text="Is this an isolated project or are there similar projects in the same geographic area? If there are more, can you describe them? Are there any significant cumulative synergistic effects?", + verbose_name="Describe if the project is isolated or commonplace.", + ), ), migrations.AlterField( - model_name='casestudy', - name='key_actors_involved', - field=models.TextField(blank=True, verbose_name='Key actors involved (individual/organisational)'), + model_name="casestudy", + name="key_actors_involved", + field=models.TextField( + blank=True, + verbose_name="Key actors involved (individual/organisational)", + ), ), migrations.AlterField( - model_name='casestudy', - name='land_ownership', - field=models.CharField(choices=[('PRI', 'Private Land'), ('PUB', 'Public Land'), ('COM', 'Community Land'), ('OTH', 'Other')], help_text='What type of ownership does the land fall under?', max_length=3, verbose_name='Land ownership'), + model_name="casestudy", + name="land_ownership", + field=models.CharField( + choices=[ + ("PRI", "Private Land"), + ("PUB", "Public Land"), + ("COM", "Community Land"), + ("OTH", "Other"), + ], + help_text="What type of ownership does the land fall under?", + max_length=3, + verbose_name="Land ownership", + ), ), migrations.AlterField( - model_name='casestudy', - name='land_ownership_details', - field=models.CharField(blank=True, help_text='Please specify details about land ownership', max_length=256, verbose_name='Land ownership details'), + model_name="casestudy", + name="land_ownership_details", + field=models.CharField( + blank=True, + help_text="Please specify details about land ownership", + max_length=256, + verbose_name="Land ownership details", + ), ), migrations.AlterField( - model_name='casestudy', - name='maximum_power_output', - field=models.DecimalField(blank=True, decimal_places=3, help_text='Enter the maximum power output of the storage system in kilowatts (kW).', max_digits=12, null=True, verbose_name='Maximum power output'), + model_name="casestudy", + name="maximum_power_output", + field=models.DecimalField( + blank=True, + decimal_places=3, + help_text="Enter the maximum power output of the storage system in kilowatts (kW).", + max_digits=12, + null=True, + verbose_name="Maximum power output", + ), ), migrations.AlterField( - model_name='casestudy', - name='media_coverage_independent', - field=models.TextField(blank=True, help_text='Provide any links to grassroots/independent media coverage.', verbose_name='Independent grassroots reports'), + model_name="casestudy", + name="media_coverage_independent", + field=models.TextField( + blank=True, + help_text="Provide any links to grassroots/independent media coverage.", + verbose_name="Independent grassroots reports", + ), ), migrations.AlterField( - model_name='casestudy', - name='media_coverage_mainstream', - field=models.TextField(blank=True, help_text='Provide any links to mainstream media coverage.', verbose_name='Links to media reports'), + model_name="casestudy", + name="media_coverage_mainstream", + field=models.TextField( + blank=True, + help_text="Provide any links to mainstream media coverage.", + verbose_name="Links to media reports", + ), ), migrations.AlterField( - model_name='casestudy', - name='minerals_or_commodities', - field=models.CharField(blank=True, choices=[('ALU', 'Aluminium (Bauxite)'), ('ARS', 'Arsenic'), ('BER', 'Beryllium'), ('CAD', 'Cadmium'), ('CHR', 'Chromium'), ('COK', 'Coking'), ('COA', 'Coal (for steel)'), ('COP', 'Copper'), ('GAL', 'Gallium'), ('GER', 'Germanium'), ('GLD', 'Gold'), ('HRE', 'Heavy Rare Earth Elements (Gadolinium, Terbium, Dysprosium, Holmium, Erbium, Thulium, Ytterbium, Lutetium, Yttrium, Scandium)'), ('IRN', 'Iron'), ('LRE', 'Light Rare Earth Elements (Lanthanum, Cerium, Praseodymium, Neodymium, Promethium, Samarium, Europium)'), ('LED', 'Lead'), ('LIT', 'Lithium'), ('MAN', 'Manganese'), ('MER', 'Mercury'), ('MOL', 'Molybdenum'), ('NIC', 'Nickel'), ('NIO', 'Niobium'), ('PGM', 'Platinum group metals (ruthenium, rhodium, palladium, osmium, iridium, and platinum)'), ('RHE', 'Rhenium'), ('SIL', 'Silicon'), ('SIV', 'Silver'), ('TAN', 'Tantalum'), ('TEL', 'Tellurium'), ('THA', 'Thallium'), ('TIN', 'Tin'), ('TIT', 'Titanium'), ('TUN', 'Tungsten'), ('VAN', 'Vanadium'), ('ZNC', 'Zinc'), ('OTR', 'Other')], help_text='Select the mineral commodity that is primarily mined in this project', max_length=3, verbose_name='Mineral commodity/commodities'), + model_name="casestudy", + name="minerals_or_commodities", + field=models.CharField( + blank=True, + choices=[ + ("ALU", "Aluminium (Bauxite)"), + ("ARS", "Arsenic"), + ("BER", "Beryllium"), + ("CAD", "Cadmium"), + ("CHR", "Chromium"), + ("COK", "Coking"), + ("COA", "Coal (for steel)"), + ("COP", "Copper"), + ("GAL", "Gallium"), + ("GER", "Germanium"), + ("GLD", "Gold"), + ( + "HRE", + "Heavy Rare Earth Elements (Gadolinium, Terbium, Dysprosium, Holmium, Erbium, Thulium, Ytterbium, Lutetium, Yttrium, Scandium)", + ), + ("IRN", "Iron"), + ( + "LRE", + "Light Rare Earth Elements (Lanthanum, Cerium, Praseodymium, Neodymium, Promethium, Samarium, Europium)", + ), + ("LED", "Lead"), + ("LIT", "Lithium"), + ("MAN", "Manganese"), + ("MER", "Mercury"), + ("MOL", "Molybdenum"), + ("NIC", "Nickel"), + ("NIO", "Niobium"), + ( + "PGM", + "Platinum group metals (ruthenium, rhodium, palladium, osmium, iridium, and platinum)", + ), + ("RHE", "Rhenium"), + ("SIL", "Silicon"), + ("SIV", "Silver"), + ("TAN", "Tantalum"), + ("TEL", "Tellurium"), + ("THA", "Thallium"), + ("TIN", "Tin"), + ("TIT", "Titanium"), + ("TUN", "Tungsten"), + ("VAN", "Vanadium"), + ("ZNC", "Zinc"), + ("OTR", "Other"), + ], + help_text="Select the mineral commodity that is primarily mined in this project", + max_length=3, + verbose_name="Mineral commodity/commodities", + ), ), migrations.AlterField( - model_name='casestudy', - name='minerals_or_commodities_other', - field=models.CharField(blank=True, help_text="Enter the mineral commodity that isn't in the list.", max_length=64, verbose_name='Other mineral commodity'), + model_name="casestudy", + name="minerals_or_commodities_other", + field=models.CharField( + blank=True, + help_text="Enter the mineral commodity that isn't in the list.", + max_length=64, + verbose_name="Other mineral commodity", + ), ), migrations.AlterField( - model_name='casestudy', - name='name_of_territory_or_area', - field=models.CharField(blank=True, max_length=512, verbose_name='Name of territory or area'), + model_name="casestudy", + name="name_of_territory_or_area", + field=models.CharField( + blank=True, max_length=512, verbose_name="Name of territory or area" + ), ), migrations.AlterField( - model_name='casestudy', - name='negative_case_reasons', - field=multiselectfield.db.fields.MultiSelectField(blank=True, choices=[('VOLR', 'Violation of land rights'), ('VOHR', 'Violation of fundamental human rights, indigenous rights and/or other collective rights'), ('EIMP', 'Environmental impacts (severe impacts on ecosystems / violation of laws, plans or programs of environmental conservation or territorial governance systems etc.'), ('NCUL', 'Negative cultural impacts (erosion/destruction of bio-cultural heritage, impacts on sacred land etc)'), ('AGGR', 'Aggression/threats to community members opposed to the project, collaboration with organized crime etc'), ('ALAB', 'Abusive labour practices'), ('CRUP', 'Corruption and/or irregular permitting or contracting, conflicts of interest etc'), ('OTHR', 'Other reasons')], max_length=39, verbose_name='Reasons this is a negative case study'), + model_name="casestudy", + name="negative_case_reasons", + field=multiselectfield.db.fields.MultiSelectField( + blank=True, + choices=[ + ("VOLR", "Violation of land rights"), + ( + "VOHR", + "Violation of fundamental human rights, indigenous rights and/or other collective rights", + ), + ( + "EIMP", + "Environmental impacts (severe impacts on ecosystems / violation of laws, plans or programs of environmental conservation or territorial governance systems etc.", + ), + ( + "NCUL", + "Negative cultural impacts (erosion/destruction of bio-cultural heritage, impacts on sacred land etc)", + ), + ( + "AGGR", + "Aggression/threats to community members opposed to the project, collaboration with organized crime etc", + ), + ("ALAB", "Abusive labour practices"), + ( + "CRUP", + "Corruption and/or irregular permitting or contracting, conflicts of interest etc", + ), + ("OTHR", "Other reasons"), + ], + max_length=39, + verbose_name="Reasons this is a negative case study", + ), ), migrations.AlterField( - model_name='casestudy', - name='negative_case_reasons_other', - field=models.CharField(blank=True, help_text='Please include other reasons, noting that we aim to focus on projects with substantive negative impacts on vulnerable groups.', max_length=512, verbose_name='Other reason for negative case'), + model_name="casestudy", + name="negative_case_reasons_other", + field=models.CharField( + blank=True, + help_text="Please include other reasons, noting that we aim to focus on projects with substantive negative impacts on vulnerable groups.", + max_length=512, + verbose_name="Other reason for negative case", + ), ), migrations.AlterField( - model_name='casestudy', - name='negative_socioenvironmental_impacts', - field=models.TextField(blank=True, help_text='Provide a detailed description of the negative socio-environmental impacts (please provide all relevant details, such as type of ecosystem and presence of any existing reserve in the area, , specific communities affected by the project, total geographic footprint of the project, and tenure system affected in the case of land grabs, kind of permits that were irregularly issued if this is the case.', verbose_name='Describe the negative socio-environmental impacts'), + model_name="casestudy", + name="negative_socioenvironmental_impacts", + field=models.TextField( + blank=True, + help_text="Provide a detailed description of the negative socio-environmental impacts (please provide all relevant details, such as type of ecosystem and presence of any existing reserve in the area, , specific communities affected by the project, total geographic footprint of the project, and tenure system affected in the case of land grabs, kind of permits that were irregularly issued if this is the case.", + verbose_name="Describe the negative socio-environmental impacts", + ), ), migrations.AlterField( - model_name='casestudy', - name='obstacles_and_hindrances', - field=models.CharField(blank=True, help_text='List any obstacles or hindrances experienced in the course of the project', max_length=512, verbose_name='Obstacles and hindrances'), + model_name="casestudy", + name="obstacles_and_hindrances", + field=models.CharField( + blank=True, + help_text="List any obstacles or hindrances experienced in the course of the project", + max_length=512, + verbose_name="Obstacles and hindrances", + ), ), migrations.AlterField( - model_name='casestudy', - name='positive_case_type', - field=models.CharField(blank=True, choices=[('CREP', 'Community renewable energy project'), ('EACP', 'Energy as a commons project'), ('PSEP', 'Public/state (federal, state, municipal) energy project'), ('CORS', 'A case of responsible sourcing/supply chain/lifecycle management')], help_text='Select the most relevant type of positive case', max_length=4, verbose_name='What kind of positive case is this entry about?'), + model_name="casestudy", + name="positive_case_type", + field=models.CharField( + blank=True, + choices=[ + ("CREP", "Community renewable energy project"), + ("EACP", "Energy as a commons project"), + ("PSEP", "Public/state (federal, state, municipal) energy project"), + ( + "CORS", + "A case of responsible sourcing/supply chain/lifecycle management", + ), + ], + help_text="Select the most relevant type of positive case", + max_length=4, + verbose_name="What kind of positive case is this entry about?", + ), ), migrations.AlterField( - model_name='casestudy', - name='potential_partnerships', - field=models.CharField(blank=True, help_text='Are you looking for partnerships or do you have any clearly identified need? If so, please describe it here.', max_length=512, verbose_name='Describe potential partnerships'), + model_name="casestudy", + name="potential_partnerships", + field=models.CharField( + blank=True, + help_text="Are you looking for partnerships or do you have any clearly identified need? If so, please describe it here.", + max_length=512, + verbose_name="Describe potential partnerships", + ), ), migrations.AlterField( - model_name='casestudy', - name='power_technology', - field=models.CharField(blank=True, choices=[('PT', 'Power transmission (grid lines, substations etc)'), ('ES', 'Energy storage (pumped storage, compressed air, battery systems etc'), ('OT', 'Others')], help_text='Select the related energy technology.', max_length=2, verbose_name='Power technology'), + model_name="casestudy", + name="power_technology", + field=models.CharField( + blank=True, + choices=[ + ("PT", "Power transmission (grid lines, substations etc)"), + ( + "ES", + "Energy storage (pumped storage, compressed air, battery systems etc", + ), + ("OT", "Others"), + ], + help_text="Select the related energy technology.", + max_length=2, + verbose_name="Power technology", + ), ), migrations.AlterField( - model_name='casestudy', - name='power_technology_other', - field=models.CharField(blank=True, help_text="If you answered 'others', please specify the power technologies.", max_length=128, verbose_name='Other power technology'), + model_name="casestudy", + name="power_technology_other", + field=models.CharField( + blank=True, + help_text="If you answered 'others', please specify the power technologies.", + max_length=128, + verbose_name="Other power technology", + ), ), migrations.AlterField( - model_name='casestudy', - name='project_status', - field=models.CharField(choices=[('EXSTNG', 'Existing Project'), ('UCONST', 'Under Construction'), ('PROJCD', 'Projected Project')], help_text='What is the status of the current project?', max_length=6, verbose_name='Status of Project'), + model_name="casestudy", + name="project_status", + field=models.CharField( + choices=[ + ("EXSTNG", "Existing Project"), + ("UCONST", "Under Construction"), + ("PROJCD", "Projected Project"), + ], + help_text="What is the status of the current project?", + max_length=6, + verbose_name="Status of Project", + ), ), migrations.AlterField( - model_name='casestudy', - name='project_status_detail', - field=models.TextField(blank=True, help_text="Describe the current status of the project, expanding beyond 'existing', 'under construction' etc", verbose_name='Current status of the project'), + model_name="casestudy", + name="project_status_detail", + field=models.TextField( + blank=True, + help_text="Describe the current status of the project, expanding beyond 'existing', 'under construction' etc", + verbose_name="Current status of the project", + ), ), migrations.AlterField( - model_name='casestudy', - name='projected_production_of_commodities', - field=models.CharField(blank=True, help_text="Describe the projected production of commodities per annum and overall (e.g. '40 million tonnes of iron ore per year, 200 million tonnes over 5 year life of mine'", max_length=256, verbose_name='Projected production of key commodities'), + model_name="casestudy", + name="projected_production_of_commodities", + field=models.CharField( + blank=True, + help_text="Describe the projected production of commodities per annum and overall (e.g. '40 million tonnes of iron ore per year, 200 million tonnes over 5 year life of mine'", + max_length=256, + verbose_name="Projected production of key commodities", + ), ), migrations.AlterField( - model_name='casestudy', - name='sector_of_economy', - field=models.CharField(choices=[('RN', 'Renewable Energy Generation'), ('PG', 'Power Grids'), ('SM', 'Supply of Minerals')], help_text='Which sector of the renewable energy economy is most relevant?', max_length=3, verbose_name='Sector of economy'), + model_name="casestudy", + name="sector_of_economy", + field=models.CharField( + choices=[ + ("RN", "Renewable Energy Generation"), + ("PG", "Power Grids"), + ("SM", "Supply of Minerals"), + ], + help_text="Which sector of the renewable energy economy is most relevant?", + max_length=3, + verbose_name="Sector of economy", + ), ), migrations.AlterField( - model_name='casestudy', - name='size_of_concessions', - field=models.CharField(blank=True, help_text="Describe the size of concession(s) granted to company/companies (e.g. 'one concession encompassing 2,300 hectares')", max_length=200, verbose_name='Size of concessions'), + model_name="casestudy", + name="size_of_concessions", + field=models.CharField( + blank=True, + help_text="Describe the size of concession(s) granted to company/companies (e.g. 'one concession encompassing 2,300 hectares')", + max_length=200, + verbose_name="Size of concessions", + ), ), migrations.AlterField( - model_name='casestudy', - name='social_media_links', - field=models.TextField(blank=True, help_text='Add any links to social media accounts directly relating to the project.', max_length=500, verbose_name='Social media links'), + model_name="casestudy", + name="social_media_links", + field=models.TextField( + blank=True, + help_text="Add any links to social media accounts directly relating to the project.", + max_length=500, + verbose_name="Social media links", + ), ), migrations.AlterField( - model_name='casestudy', - name='socioeconomic_benefits', - field=models.TextField(blank=True, help_text='Please expand on your response given in the full description on page one. We would expect benefits to go beyond emissions savings, paying rent for land, or complying with environmental or social legislation', verbose_name='Socio-economic benefits'), + model_name="casestudy", + name="socioeconomic_benefits", + field=models.TextField( + blank=True, + help_text="Please expand on your response given in the full description on page one. We would expect benefits to go beyond emissions savings, paying rent for land, or complying with environmental or social legislation", + verbose_name="Socio-economic benefits", + ), ), migrations.AlterField( - model_name='casestudy', - name='start_year', - field=models.IntegerField(blank=True, choices=[(1978, 1978), (1979, 1979), (1980, 1980), (1981, 1981), (1982, 1982), (1983, 1983), (1984, 1984), (1985, 1985), (1986, 1986), (1987, 1987), (1988, 1988), (1989, 1989), (1990, 1990), (1991, 1991), (1992, 1992), (1993, 1993), (1994, 1994), (1995, 1995), (1996, 1996), (1997, 1997), (1998, 1998), (1999, 1999), (2000, 2000), (2001, 2001), (2002, 2002), (2003, 2003), (2004, 2004), (2005, 2005), (2006, 2006), (2007, 2007), (2008, 2008), (2009, 2009), (2010, 2010), (2011, 2011), (2012, 2012), (2013, 2013), (2014, 2014), (2015, 2015), (2016, 2016), (2017, 2017), (2018, 2018), (2019, 2019), (2020, 2020), (2021, 2021), (2022, 2022), (2023, 2023), (2024, 2024), (2025, 2025), (2026, 2026), (2027, 2027), (2028, 2028), (2029, 2029), (2030, 2030), (2031, 2031), (2032, 2032), (2033, 2033), (2034, 2034), (2035, 2035), (2036, 2036), (2037, 2037), (2038, 2038), (2039, 2039), (2040, 2040), (2041, 2041), (2042, 2042), (2043, 2043), (2044, 2044), (2045, 2045), (2046, 2046), (2047, 2047), (2048, 2048), (2049, 2049), (2050, 2050), (2051, 2051), (2052, 2052), (2053, 2053), (2054, 2054), (2055, 2055), (2056, 2056), (2057, 2057), (2058, 2058)], help_text="Select the year the project was started. If the project hasn't begun, select the projected start year.", null=True, verbose_name='Start year'), + model_name="casestudy", + name="start_year", + field=models.IntegerField( + blank=True, + choices=[ + (1978, 1978), + (1979, 1979), + (1980, 1980), + (1981, 1981), + (1982, 1982), + (1983, 1983), + (1984, 1984), + (1985, 1985), + (1986, 1986), + (1987, 1987), + (1988, 1988), + (1989, 1989), + (1990, 1990), + (1991, 1991), + (1992, 1992), + (1993, 1993), + (1994, 1994), + (1995, 1995), + (1996, 1996), + (1997, 1997), + (1998, 1998), + (1999, 1999), + (2000, 2000), + (2001, 2001), + (2002, 2002), + (2003, 2003), + (2004, 2004), + (2005, 2005), + (2006, 2006), + (2007, 2007), + (2008, 2008), + (2009, 2009), + (2010, 2010), + (2011, 2011), + (2012, 2012), + (2013, 2013), + (2014, 2014), + (2015, 2015), + (2016, 2016), + (2017, 2017), + (2018, 2018), + (2019, 2019), + (2020, 2020), + (2021, 2021), + (2022, 2022), + (2023, 2023), + (2024, 2024), + (2025, 2025), + (2026, 2026), + (2027, 2027), + (2028, 2028), + (2029, 2029), + (2030, 2030), + (2031, 2031), + (2032, 2032), + (2033, 2033), + (2034, 2034), + (2035, 2035), + (2036, 2036), + (2037, 2037), + (2038, 2038), + (2039, 2039), + (2040, 2040), + (2041, 2041), + (2042, 2042), + (2043, 2043), + (2044, 2044), + (2045, 2045), + (2046, 2046), + (2047, 2047), + (2048, 2048), + (2049, 2049), + (2050, 2050), + (2051, 2051), + (2052, 2052), + (2053, 2053), + (2054, 2054), + (2055, 2055), + (2056, 2056), + (2057, 2057), + (2058, 2058), + ], + help_text="Select the year the project was started. If the project hasn't begun, select the projected start year.", + null=True, + verbose_name="Start year", + ), ), migrations.AlterField( - model_name='casestudy', - name='total_generation_capacity', - field=models.PositiveIntegerField(blank=True, help_text='Please enter the total generation capacity of the project in kW', null=True, verbose_name='Total generation capacity (in kW)'), + model_name="casestudy", + name="total_generation_capacity", + field=models.PositiveIntegerField( + blank=True, + help_text="Please enter the total generation capacity of the project in kW", + null=True, + verbose_name="Total generation capacity (in kW)", + ), ), migrations.AlterField( - model_name='casestudy', - name='total_investment', - field=models.IntegerField(blank=True, help_text='The approximate total investment for the project in USD.', null=True, verbose_name='Total investment (in USD)'), + model_name="casestudy", + name="total_investment", + field=models.IntegerField( + blank=True, + help_text="The approximate total investment for the project in USD.", + null=True, + verbose_name="Total investment (in USD)", + ), ), migrations.AlterField( - model_name='casestudy', - name='type_of_ecosystem', - field=multiselectfield.db.fields.MultiSelectField(blank=True, choices=[('MARINE', 'Marine (e.g. Ocean, Sea)'), ('FRESH', 'Freshwater (e.g. Freshwater, Lake)'), ('FOREST', 'Forest/Jungle'), ('AGRI', 'Agricultural Land'), ('GRASS', 'Grassland'), ('DESERT', 'Desert (Tundra, Ice or Sand)'), ('WETLND', 'Wetland (Marsh, Mangrove, Peat Soil)'), ('URBAN', 'Urban')], help_text='Select the most relevant type(s).', max_length=56, verbose_name='Type(s) of ecosystem'), + model_name="casestudy", + name="type_of_ecosystem", + field=multiselectfield.db.fields.MultiSelectField( + blank=True, + choices=[ + ("MARINE", "Marine (e.g. Ocean, Sea)"), + ("FRESH", "Freshwater (e.g. Freshwater, Lake)"), + ("FOREST", "Forest/Jungle"), + ("AGRI", "Agricultural Land"), + ("GRASS", "Grassland"), + ("DESERT", "Desert (Tundra, Ice or Sand)"), + ("WETLND", "Wetland (Marsh, Mangrove, Peat Soil)"), + ("URBAN", "Urban"), + ], + help_text="Select the most relevant type(s).", + max_length=56, + verbose_name="Type(s) of ecosystem", + ), ), migrations.AlterField( - model_name='casestudy', - name='type_of_extraction', - field=models.CharField(blank=True, choices=[('SUR', 'Surface (open pit/open cast/open cut mining)'), ('SUB', 'Sub-surface (underground mining)'), ('SEA', 'Seabed mining'), ('URB', 'Urban mining/recycling')], max_length=3, verbose_name='Type of extraction'), + model_name="casestudy", + name="type_of_extraction", + field=models.CharField( + blank=True, + choices=[ + ("SUR", "Surface (open pit/open cast/open cut mining)"), + ("SUB", "Sub-surface (underground mining)"), + ("SEA", "Seabed mining"), + ("URB", "Urban mining/recycling"), + ], + max_length=3, + verbose_name="Type of extraction", + ), ), migrations.AlterField( - model_name='casestudy', - name='use_in_energy_economy', - field=models.CharField(blank=True, choices=[('WTM', 'Wind turbine manufacturing'), ('SPM', 'Solar panel manufacturing'), ('STM', 'Solar thermal system manufacturing'), ('HGM', 'Hydropower generator manufacturing'), ('GGM', 'Geothermal generator manufacturing'), ('ESS', 'Energy storage (inc. battery systems)'), ('OTR', 'Others')], help_text='Select the potential use of the minerals in the renewable energy economy', max_length=3, verbose_name='Potential use in renewable energy economy'), + model_name="casestudy", + name="use_in_energy_economy", + field=models.CharField( + blank=True, + choices=[ + ("WTM", "Wind turbine manufacturing"), + ("SPM", "Solar panel manufacturing"), + ("STM", "Solar thermal system manufacturing"), + ("HGM", "Hydropower generator manufacturing"), + ("GGM", "Geothermal generator manufacturing"), + ("ESS", "Energy storage (inc. battery systems)"), + ("OTR", "Others"), + ], + help_text="Select the potential use of the minerals in the renewable energy economy", + max_length=3, + verbose_name="Potential use in renewable energy economy", + ), ), migrations.AlterField( - model_name='casestudy', - name='use_in_energy_economy_other', - field=models.CharField(blank=True, max_length=128, verbose_name='Other use in energy economy'), + model_name="casestudy", + name="use_in_energy_economy_other", + field=models.CharField( + blank=True, max_length=128, verbose_name="Other use in energy economy" + ), ), migrations.AlterField( - model_name='casestudy', - name='video_caption', - field=models.CharField(blank=True, max_length=240, verbose_name='Video caption'), + model_name="casestudy", + name="video_caption", + field=models.CharField( + blank=True, max_length=240, verbose_name="Video caption" + ), ), migrations.AlterField( - model_name='casestudy', - name='video_credit', - field=models.CharField(blank=True, max_length=240, verbose_name='Video credit(s)'), + model_name="casestudy", + name="video_credit", + field=models.CharField( + blank=True, max_length=240, verbose_name="Video credit(s)" + ), ), migrations.AlterField( - model_name='casestudy', - name='when_did_organising_start', - field=models.CharField(blank=True, help_text='Before the project started? During project implementation? After project implementation? Describe in your own words.', max_length=512, verbose_name='When did local organising efforts begin?'), + model_name="casestudy", + name="when_did_organising_start", + field=models.CharField( + blank=True, + help_text="Before the project started? During project implementation? After project implementation? Describe in your own words.", + max_length=512, + verbose_name="When did local organising efforts begin?", + ), ), migrations.AlterField( - model_name='casestudy', - name='who_has_been_involved', - field=models.TextField(blank=True, verbose_name='Which communities, groups and organisations have been involved?'), + model_name="casestudy", + name="who_has_been_involved", + field=models.TextField( + blank=True, + verbose_name="Which communities, groups and organisations have been involved?", + ), ), ] diff --git a/apps/map/migrations/0071_point_of_interest.py b/apps/map/migrations/0071_point_of_interest.py index ed3c452..4726494 100644 --- a/apps/map/migrations/0071_point_of_interest.py +++ b/apps/map/migrations/0071_point_of_interest.py @@ -13,22 +13,44 @@ class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), - ('map', '0070_remove_null_from_text_fields_schema'), + ("map", "0070_remove_null_from_text_fields_schema"), ] operations = [ migrations.CreateModel( - name='PointOfInterest', + name="PointOfInterest", fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('date_created', models.DateTimeField(auto_now_add=True)), - ('slug', django_extensions.db.fields.AutoSlugField(blank=True, editable=False, populate_from=['entry_name'])), - ('approved', models.BooleanField(default=False)), - ('title', models.CharField(max_length=128)), - ('location', django.contrib.gis.db.models.fields.PointField(srid=4326)), - ('synopsis', models.TextField()), - ('link', models.URLField()), - ('author', models.ForeignKey(blank=True, editable=False, null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL)), + ( + "id", + models.AutoField( + auto_created=True, + primary_key=True, + serialize=False, + verbose_name="ID", + ), + ), + ("date_created", models.DateTimeField(auto_now_add=True)), + ( + "slug", + django_extensions.db.fields.AutoSlugField( + blank=True, editable=False, populate_from=["entry_name"] + ), + ), + ("approved", models.BooleanField(default=False)), + ("title", models.CharField(max_length=128)), + ("location", django.contrib.gis.db.models.fields.PointField(srid=4326)), + ("synopsis", models.TextField()), + ("link", models.URLField()), + ( + "author", + models.ForeignKey( + blank=True, + editable=False, + null=True, + on_delete=django.db.models.deletion.SET_NULL, + to=settings.AUTH_USER_MODEL, + ), + ), ], - ), + ) ] diff --git a/apps/map/migrations/0072_auto_20181201_2315.py b/apps/map/migrations/0072_auto_20181201_2315.py index 5ea22bd..3e1cc44 100644 --- a/apps/map/migrations/0072_auto_20181201_2315.py +++ b/apps/map/migrations/0072_auto_20181201_2315.py @@ -8,302 +8,969 @@ import multiselectfield.db.fields class Migration(migrations.Migration): - dependencies = [ - ('map', '0071_point_of_interest'), - ] + dependencies = [("map", "0071_point_of_interest")] operations = [ migrations.AlterModelOptions( - name='pointofinterest', - options={'verbose_name_plural': 'points of interest'}, + name="pointofinterest", + options={"verbose_name_plural": "points of interest"}, ), migrations.RemoveField( - model_name='casestudy', - name='generation_technology_other', + 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'), + 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'), + 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'), + 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)'), + 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?'), + 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'), + 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'), + 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'), + 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'), + 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?'), + 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?'), + 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'), + 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:

  • where the fuel came from e.g. corn, forestry, algae, commercial food waste, landfill gas, sewage, livestock farm, etc.
  • how it is processed e.g. direct-fired, co-firing with other renewable input, gasification, bacterial decomposition (anaerobic digestion, AD), pyrolysis, small/modular, artificial photosynthesis, fuel cell, etc.

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'), + 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:

  • where the fuel came from e.g. corn, forestry, algae, commercial food waste, landfill gas, sewage, livestock farm, etc.
  • how it is processed e.g. direct-fired, co-firing with other renewable input, gasification, bacterial decomposition (anaerobic digestion, AD), pyrolysis, small/modular, artificial photosynthesis, fuel cell, etc.

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'), + 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'), + 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'), + 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'), + 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'), + 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'), + 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)'), + 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'), + 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'), + 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'), + 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)'), + 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'), + 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'), + 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?'), + 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'), + 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'), + 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'), + 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'), + 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'), + 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?'), + 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):'), + 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'), + 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'), + 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'), + 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'), + 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?'), + 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?'), + 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'), + 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'), + 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'), + 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'), + 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'), + 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'), + 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'), + 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'), + 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)'), + 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'), + 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'), + 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)'), + 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'), + 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'), + 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'), + 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?'), + 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']), + model_name="pointofinterest", + name="slug", + field=django_extensions.db.fields.AutoSlugField( + blank=True, editable=False, populate_from=["title"] + ), ), ] diff --git a/apps/map/migrations/0073_auto_20181202_0209.py b/apps/map/migrations/0073_auto_20181202_0209.py index 8ceacb7..1d50de5 100644 --- a/apps/map/migrations/0073_auto_20181202_0209.py +++ b/apps/map/migrations/0073_auto_20181202_0209.py @@ -5,44 +5,79 @@ from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [ - ('map', '0072_auto_20181201_2315'), - ] + dependencies = [("map", "0072_auto_20181201_2315")] operations = [ migrations.AlterField( - model_name='casestudy', - name='approximate_total_investment', - field=models.PositiveIntegerField(blank=True, default=None, help_text='Enter the approximate total investment in USD ($).', null=True, verbose_name='DELETE - Approximate total investment'), + model_name="casestudy", + name="approximate_total_investment", + field=models.PositiveIntegerField( + blank=True, + default=None, + help_text="Enter the approximate total investment in USD ($).", + null=True, + verbose_name="DELETE - Approximate total investment", + ), ), migrations.AlterField( - model_name='casestudy', - name='discharge_time', - field=models.DecimalField(blank=True, decimal_places=3, help_text='Enter the time it takes to discharge from full capacity at maximum power output (in hours).', max_digits=6, null=True, verbose_name='DELETE - Time for discharge from full capacity'), + model_name="casestudy", + name="discharge_time", + field=models.DecimalField( + blank=True, + decimal_places=3, + help_text="Enter the time it takes to discharge from full capacity at maximum power output (in hours).", + max_digits=6, + null=True, + verbose_name="DELETE - Time for discharge from full capacity", + ), ), 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='DELETE - Generation equipment supplier(s)'), + 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="DELETE - Generation equipment supplier(s)", + ), ), migrations.AlterField( - model_name='casestudy', - name='maximum_power_output', - field=models.DecimalField(blank=True, decimal_places=3, help_text='Enter the maximum power output of the storage system in kilowatts (kW).', max_digits=12, null=True, verbose_name='DELETE - Maximum power output'), + model_name="casestudy", + name="maximum_power_output", + field=models.DecimalField( + blank=True, + decimal_places=3, + help_text="Enter the maximum power output of the storage system in kilowatts (kW).", + max_digits=12, + null=True, + verbose_name="DELETE - Maximum power output", + ), ), migrations.AlterField( - model_name='casestudy', - name='people_affected_indigenous', - field=models.TextField(blank=True, help_text='What group or groups of indigenous people are affected by this project? Please separate by newline.', verbose_name='DELETE - Indigenous people affected'), + model_name="casestudy", + name="people_affected_indigenous", + field=models.TextField( + blank=True, + help_text="What group or groups of indigenous people are affected by this project? Please separate by newline.", + verbose_name="DELETE - Indigenous people affected", + ), ), migrations.AlterField( - model_name='casestudy', - name='potential_partnerships', - field=models.CharField(blank=True, help_text='Are you looking for partnerships or do you have any clearly identified need? If so, please describe it here.', max_length=512, verbose_name='DELETE - Describe potential partnerships'), + model_name="casestudy", + name="potential_partnerships", + field=models.CharField( + blank=True, + help_text="Are you looking for partnerships or do you have any clearly identified need? If so, please describe it here.", + max_length=512, + verbose_name="DELETE - Describe potential partnerships", + ), ), migrations.AlterField( - model_name='casestudy', - name='technical_or_economic_details', - field=models.TextField(blank=True, help_text='Specify any additional technical or economic details relating to the project.', verbose_name='DELETE - Additional technical or economic details'), + model_name="casestudy", + name="technical_or_economic_details", + field=models.TextField( + blank=True, + help_text="Specify any additional technical or economic details relating to the project.", + verbose_name="DELETE - Additional technical or economic details", + ), ), ] diff --git a/apps/map/migrations/0074_auto_20181202_0223.py b/apps/map/migrations/0074_auto_20181202_0223.py index 4049ed3..0303d35 100644 --- a/apps/map/migrations/0074_auto_20181202_0223.py +++ b/apps/map/migrations/0074_auto_20181202_0223.py @@ -5,37 +5,22 @@ from django.db import migrations class Migration(migrations.Migration): - dependencies = [ - ('map', '0073_auto_20181202_0209'), - ] + dependencies = [("map", "0073_auto_20181202_0209")] operations = [ migrations.RemoveField( - model_name='casestudy', - name='approximate_total_investment', + model_name="casestudy", name="approximate_total_investment" ), + migrations.RemoveField(model_name="casestudy", name="discharge_time"), migrations.RemoveField( - model_name='casestudy', - name='discharge_time', + model_name="casestudy", name="generation_equipment_supplier" ), + migrations.RemoveField(model_name="casestudy", name="maximum_power_output"), migrations.RemoveField( - model_name='casestudy', - name='generation_equipment_supplier', + model_name="casestudy", name="people_affected_indigenous" ), + migrations.RemoveField(model_name="casestudy", name="potential_partnerships"), migrations.RemoveField( - model_name='casestudy', - name='maximum_power_output', - ), - migrations.RemoveField( - model_name='casestudy', - name='people_affected_indigenous', - ), - migrations.RemoveField( - model_name='casestudy', - name='potential_partnerships', - ), - migrations.RemoveField( - model_name='casestudy', - name='technical_or_economic_details', + model_name="casestudy", name="technical_or_economic_details" ), ] diff --git a/apps/map/migrations/0075_auto_20190304_2016.py b/apps/map/migrations/0075_auto_20190304_2016.py index dc2c17a..610b72e 100644 --- a/apps/map/migrations/0075_auto_20190304_2016.py +++ b/apps/map/migrations/0075_auto_20190304_2016.py @@ -5,44 +5,234 @@ from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [ - ('map', '0074_auto_20181202_0223'), - ] + dependencies = [("map", "0074_auto_20181202_0223")] operations = [ migrations.AddField( - model_name='casestudy', - name='language', + model_name="casestudy", + name="language", field=models.CharField(blank=True, max_length=16), ), migrations.AlterField( - model_name='casestudy', - name='area_of_land', - field=models.IntegerField(help_text='The area of land covered by the project (km²)', verbose_name='Approximate land area'), + model_name="casestudy", + name="area_of_land", + field=models.IntegerField( + help_text="The area of land covered by the project (km²)", + verbose_name="Approximate land area", + ), ), migrations.AlterField( - model_name='casestudy', - name='completion_year', - field=models.IntegerField(blank=True, choices=[(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), (2059, 2059)], 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'), + model_name="casestudy", + name="completion_year", + field=models.IntegerField( + blank=True, + choices=[ + (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), + (2059, 2059), + ], + 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='entry_name', - field=models.CharField(help_text='Please write the local name, followed by any translated name if necessary.', max_length=128, verbose_name='Project name'), + model_name="casestudy", + name="entry_name", + field=models.CharField( + help_text="Please write the local name, followed by any translated name if necessary.", + max_length=128, + verbose_name="Project name", + ), ), 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.

", max_length=256, verbose_name='Land ownership details'), + 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.

", + max_length=256, + verbose_name="Land ownership details", + ), ), migrations.AlterField( - model_name='casestudy', - name='start_year', - field=models.IntegerField(blank=True, choices=[(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), (2059, 2059)], 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'), + model_name="casestudy", + name="start_year", + field=models.IntegerField( + blank=True, + choices=[ + (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), + (2059, 2059), + ], + 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='synopsis', - field=models.TextField(help_text='Briefly summarise the project. This will be displayed at the top of the case study page. Maximum 500 chars (about 3½ tweets)', verbose_name='Project synopsis'), + model_name="casestudy", + name="synopsis", + field=models.TextField( + help_text="Briefly summarise the project. This will be displayed at the top of the case study page. Maximum 500 chars (about 3½ tweets)", + verbose_name="Project synopsis", + ), ), ] diff --git a/apps/map/migrations/0076_casestudy_form_type.py b/apps/map/migrations/0076_casestudy_form_type.py index 53ca0f3..85308d6 100644 --- a/apps/map/migrations/0076_casestudy_form_type.py +++ b/apps/map/migrations/0076_casestudy_form_type.py @@ -5,14 +5,12 @@ from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [ - ('map', '0075_auto_20190304_2016'), - ] + dependencies = [("map", "0075_auto_20190304_2016")] operations = [ migrations.AddField( - model_name='casestudy', - name='form_type', + model_name="casestudy", + name="form_type", field=models.CharField(blank=True, max_length=16), - ), + ) ] diff --git a/apps/map/migrations/0077_auto_20190321_1924.py b/apps/map/migrations/0077_auto_20190321_1924.py index 485d987..dd545b1 100644 --- a/apps/map/migrations/0077_auto_20190321_1924.py +++ b/apps/map/migrations/0077_auto_20190321_1924.py @@ -6,204 +6,749 @@ import multiselectfield.db.fields class Migration(migrations.Migration): - dependencies = [ - ('map', '0076_casestudy_form_type'), - ] + dependencies = [("map", "0076_casestudy_form_type")] operations = [ 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'), + 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='affected_communities', - field=multiselectfield.db.fields.MultiSelectField(blank=True, choices=[('INDIG', 'Indigenous people(s)'), ('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'), + model_name="casestudy", + name="affected_communities", + field=multiselectfield.db.fields.MultiSelectField( + blank=True, + choices=[ + ("INDIG", "Indigenous people(s)"), + ("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.AlterField( - model_name='casestudy', - name='associated_infrastructure', - field=models.CharField(blank=True, help_text='List any associated infrastructure in the locality (e.g. tailings dams/mine waste storage and treatment facilities; ore processing facilities; smelting facilities; hydroelectric dams/energy infrastructure; transport infrastructure e.g. roads or rail).', max_length=256, verbose_name='Associated infrastructure in the locality'), + model_name="casestudy", + name="associated_infrastructure", + field=models.CharField( + blank=True, + help_text="List any associated infrastructure in the locality (e.g. tailings dams/mine waste storage and treatment facilities; ore processing facilities; smelting facilities; hydroelectric dams/energy infrastructure; transport infrastructure e.g. roads or rail).", + max_length=256, + verbose_name="Associated infrastructure in the locality", + ), ), migrations.AlterField( - model_name='casestudy', - name='biomass_detail', - field=models.CharField(blank=True, help_text="

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

  • where the fuel came from e.g. corn, forestry, algae, commercial food waste, landfill gas, sewage, livestock farm, etc.
  • how it is processed e.g. direct-fired, co-firing with other renewable input, gasification, bacterial decomposition (anaerobic digestion, AD), pyrolysis, small/modular, artificial photosynthesis, fuel cell, etc.

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'), + 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:

  • where the fuel came from e.g. corn, forestry, algae, commercial food waste, landfill gas, sewage, livestock farm, etc.
  • how it is processed e.g. direct-fired, co-firing with other renewable input, gasification, bacterial decomposition (anaerobic digestion, AD), pyrolysis, small/modular, artificial photosynthesis, fuel cell, etc.

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='community_voices', - field=models.TextField(blank=True, help_text='Add any direct quotes from members of the community that relate to this project', verbose_name='Community voices'), + model_name="casestudy", + name="community_voices", + field=models.TextField( + blank=True, + help_text="Add any direct quotes from members of the community that relate to this project", + verbose_name="Community voices", + ), ), migrations.AlterField( - model_name='casestudy', - name='completion_year', - field=models.IntegerField(blank=True, choices=[(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), (2059, 2059)], 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'), + model_name="casestudy", + name="completion_year", + field=models.IntegerField( + blank=True, + choices=[ + (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), + (2059, 2059), + ], + 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='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'), + 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.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'), + 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='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'), + 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'), + 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='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 (Netherlands Development Finance Company, 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'), + 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 (Netherlands Development Finance Company, 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='financial_institutions_other', - field=models.TextField(blank=True, help_text='List any other financial institutions not listed above. Put each on a new line.', verbose_name='Financial institutions – other'), + model_name="casestudy", + name="financial_institutions_other", + field=models.TextField( + blank=True, + help_text="List any other financial institutions not listed above. Put each on a new line.", + verbose_name="Financial institutions – other", + ), ), 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'), + 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_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', 'Solar power tower'), ('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'), + 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", "Solar power tower"), + ("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'), + 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?'), + 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/tenure does the land fall under?', max_length=3, verbose_name='Land ownership/tenure'), + 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/tenure 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.

", max_length=256, verbose_name='Land ownership/tenure details'), + 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.

", + max_length=256, + verbose_name="Land ownership/tenure details", + ), ), migrations.AlterField( - model_name='casestudy', - name='manufacturing_description', - field=models.TextField(blank=True, help_text='Briefly describe manufacturing process and components/outputs. (less than 500 characters).', max_length=500, verbose_name='Description'), + model_name="casestudy", + name="manufacturing_description", + field=models.TextField( + blank=True, + help_text="Briefly describe manufacturing process and components/outputs. (less than 500 characters).", + max_length=500, + verbose_name="Description", + ), ), migrations.AlterField( - model_name='casestudy', - name='manufacturing_related_tech', - field=multiselectfield.db.fields.MultiSelectField(blank=True, choices=[('PV', 'Solar PV'), ('CSP', 'Concentrated solar power (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?'), + model_name="casestudy", + name="manufacturing_related_tech", + field=multiselectfield.db.fields.MultiSelectField( + blank=True, + choices=[ + ("PV", "Solar PV"), + ("CSP", "Concentrated solar power (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.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'), + 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='name_of_territory_or_area', - field=models.CharField(blank=True, max_length=512, verbose_name='Name of territory, area or place'), + model_name="casestudy", + name="name_of_territory_or_area", + field=models.CharField( + blank=True, + max_length=512, + verbose_name="Name of territory, area or place", + ), ), 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?'), + 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_case_reasons_other', - field=models.CharField(blank=True, help_text='For negative impacts you need to focus on substantive impacts on vulnerable groups.', max_length=512, verbose_name='Other reason for negative case'), + model_name="casestudy", + name="negative_case_reasons_other", + field=models.CharField( + blank=True, + help_text="For negative impacts you need to focus on substantive impacts on vulnerable groups.", + max_length=512, + verbose_name="Other reason for negative case", + ), ), migrations.AlterField( - model_name='casestudy', - name='negative_socioenvironmental_impacts', - field=models.TextField(blank=True, help_text='Provide a detailed description of the 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):'), + 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='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'), + 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'), + 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='participation_mechanisms', - field=models.TextField(blank=True, help_text='e.g. direct action, local referendums, legal cases, letters or petitions, etc.', verbose_name='What mechanisms of participation have been used?'), + model_name="casestudy", + name="participation_mechanisms", + field=models.TextField( + blank=True, + help_text="e.g. direct action, local referendums, legal cases, letters or petitions, etc.", + verbose_name="What mechanisms of participation have been used?", + ), ), 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'), + 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?'), + 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='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'), + 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='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'), + 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 the renewable energy economy'), + 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 the renewable energy 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 i.e. area(s) of land or water affected by the project, or maybe the limits of the land within which a project is taking place or the sites of particular objects of importance. ESRI Shapefiles are a popular file type: they comprise 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. You may have data as GeoPackage (gpkg), GeoJSON, KML, GML, etc. or have data in PostGIS or another spatial database management system already. Let us know (database@ojuso.org) if you have other file types or need help and we can work out how to import it.', related_name='shapefile_for', to='files.File', verbose_name='Geographic data'), + 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 i.e. area(s) of land or water affected by the project, or maybe the limits of the land within which a project is taking place or the sites of particular objects of importance. ESRI Shapefiles are a popular file type: they comprise 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. You may have data as GeoPackage (gpkg), GeoJSON, KML, GML, etc. or have data in PostGIS or another spatial database management system already. Let us know (database@ojuso.org) if you have other file types or need help and we can work out how to import it.", + related_name="shapefile_for", + to="files.File", + verbose_name="Geographic data", + ), ), migrations.AlterField( - model_name='casestudy', - name='start_year', - field=models.IntegerField(blank=True, choices=[(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), (2059, 2059)], 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'), + model_name="casestudy", + name="start_year", + field=models.IntegerField( + blank=True, + choices=[ + (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), + (2059, 2059), + ], + 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='synopsis', - field=models.TextField(help_text='Briefly summarise the project. This will be displayed at the top of the case study page. (Maximum 500 chars)', verbose_name='Project synopsis'), + model_name="casestudy", + name="synopsis", + field=models.TextField( + help_text="Briefly summarise the project. This will be displayed at the top of the case study page. (Maximum 500 chars)", + verbose_name="Project synopsis", + ), ), 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'), + 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='wants_conversation_with_ojuso', - field=models.BooleanField(default=True, help_text='This would be a conversation about challenging or engaging related developers, companies and investors.', verbose_name='Would you like to have a conversation with the ojuso team?'), + model_name="casestudy", + name="wants_conversation_with_ojuso", + field=models.BooleanField( + default=True, + help_text="This would be a conversation about challenging or engaging related developers, companies and investors.", + verbose_name="Would you like to have a conversation with the ojuso team?", + ), ), 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?'), + 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?", + ), ), ] diff --git a/apps/map/migrations/0078_latest_form_changes.py b/apps/map/migrations/0078_latest_form_changes.py index dd20fe9..587a6c7 100644 --- a/apps/map/migrations/0078_latest_form_changes.py +++ b/apps/map/migrations/0078_latest_form_changes.py @@ -7,274 +7,909 @@ import multiselectfield.db.fields class Migration(migrations.Migration): - dependencies = [ - ('map', '0077_auto_20190321_1924'), - ] + dependencies = [("map", "0077_auto_20190321_1924")] operations = [ migrations.AlterField( - model_name='casestudy', - name='additional_technical_details', - field=models.TextField(blank=True, help_text='Please add any additional details that may help to explain the technical and economic aspects of this case study.', verbose_name='Additional technical or economic details'), + model_name="casestudy", + name="additional_technical_details", + field=models.TextField( + blank=True, + help_text="Please add any additional details that may help to explain the technical and economic aspects of this case study.", + verbose_name="Additional technical or economic details", + ), ), migrations.AlterField( - model_name='casestudy', - name='associated_infrastructure', - field=models.CharField(blank=True, help_text='Please list any associated infrastructure in the locality (e.g. tailings dams / mine waste storage and treatment facilities; ore processing facilities; smelting facilities; hydroelectric dams / energy infrastructure; transport infrastructure e.g. roads or rail).', max_length=256, verbose_name='Associated infrastructure in the locality'), + model_name="casestudy", + name="associated_infrastructure", + field=models.CharField( + blank=True, + help_text="Please list any associated infrastructure in the locality (e.g. tailings dams / mine waste storage and treatment facilities; ore processing facilities; smelting facilities; hydroelectric dams / energy infrastructure; transport infrastructure e.g. roads or rail).", + max_length=256, + verbose_name="Associated infrastructure in the locality", + ), ), migrations.AlterField( - model_name='casestudy', - name='biomass_detail', - field=models.CharField(blank=True, help_text="

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

\n
    \n
  • where the fuel came from e.g. corn, forestry, algae, commercial food waste, landfill gas, sewage, livestock farm, etc.
  • \n
  • how it is processed e.g. direct-fired, co-firing with other renewable input, gasification, bacterial decomposition (anaerobic digestion, AD), pyrolysis, artificial photosynthesis, fuel cell, etc.
  • \n
\n

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'), + 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:

\n
    \n
  • where the fuel came from e.g. corn, forestry, algae, commercial food waste, landfill gas, sewage, livestock farm, etc.
  • \n
  • how it is processed e.g. direct-fired, co-firing with other renewable input, gasification, bacterial decomposition (anaerobic digestion, AD), pyrolysis, artificial photosynthesis, fuel cell, etc.
  • \n
\n

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='community_voices', - field=models.TextField(blank=True, help_text='Please add any direct quotes from members of the community that relate to this project.', verbose_name='Community voices'), + model_name="casestudy", + name="community_voices", + field=models.TextField( + blank=True, + help_text="Please add any direct quotes from members of the community that relate to this project.", + verbose_name="Community voices", + ), ), migrations.AlterField( - model_name='casestudy', - name='completion_year', - field=models.IntegerField(blank=True, choices=[(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), (2059, 2059)], default=None, help_text="Please 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'), + model_name="casestudy", + name="completion_year", + field=models.IntegerField( + blank=True, + choices=[ + (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), + (2059, 2059), + ], + default=None, + help_text="Please 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='consultants_contractors', - field=models.TextField(blank=True, help_text='Please 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'), + model_name="casestudy", + name="consultants_contractors", + field=models.TextField( + blank=True, + help_text="Please 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.AlterField( - model_name='casestudy', - name='contractor_or_supplier_of_technology', - field=models.TextField(blank=True, help_text='Please list companies that supply the energy generation equipment\xa0- 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='Supplier of technology'), + model_name="casestudy", + name="contractor_or_supplier_of_technology", + field=models.TextField( + blank=True, + help_text="Please list companies that supply the energy generation equipment\xa0- 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="Supplier of technology", + ), ), migrations.AlterField( - model_name='casestudy', - name='country', - field=django_countries.fields.CountryField(help_text='Please select the country of the project.', max_length=2, verbose_name='Country'), + model_name="casestudy", + name="country", + field=django_countries.fields.CountryField( + help_text="Please select the country of the project.", + max_length=2, + verbose_name="Country", + ), ), migrations.AlterField( - model_name='casestudy', - name='describe_ecosystem', - field=models.TextField(verbose_name='Please describe the ecosystem.'), + model_name="casestudy", + name="describe_ecosystem", + field=models.TextField(verbose_name="Please describe the ecosystem."), ), migrations.AlterField( - model_name='casestudy', - name='direct_comms', - field=models.TextField(blank=True, help_text="Please 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'), + model_name="casestudy", + name="direct_comms", + field=models.TextField( + blank=True, + help_text="Please 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='Please list the customers that buy energy from the project, e.g. the national grid provider, or private companies. Also mention whether credits are being sold in the carbon markets. Separate with a new line.', verbose_name='Energy service consumers/off-takers'), + model_name="casestudy", + name="energy_customers", + field=models.TextField( + blank=True, + help_text="Please list the customers that buy energy from the project, e.g. the national grid provider, or private companies. Also mention whether credits are being sold in the carbon markets. Separate with a new line.", + verbose_name="Energy service consumers/off-takers", + ), ), migrations.AlterField( - model_name='casestudy', - name='energy_details', - field=models.CharField(blank=True, help_text='Please provide more information about the type of technology this case study focuses on.', max_length=200, verbose_name='Technology type'), + model_name="casestudy", + name="energy_details", + field=models.CharField( + blank=True, + help_text="Please provide more information about the type of technology this case study focuses on.", + max_length=200, + verbose_name="Technology type", + ), ), migrations.AlterField( - model_name='casestudy', - name='energy_transmission_capacity', - field=models.DecimalField(blank=True, decimal_places=3, max_digits=20, null=True, verbose_name='Total transmission or distribution capacity (kW)'), + model_name="casestudy", + name="energy_transmission_capacity", + field=models.DecimalField( + blank=True, + decimal_places=3, + max_digits=20, + null=True, + verbose_name="Total transmission or distribution capacity (kW)", + ), ), 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)'), ('IFAD', 'International Fund for Agricultural Development (IFAD)'), ('IIB', 'International Investment Bank (IIB)'), ('IsDB', 'Islamic Development Bank (IsDB)'), ('FMO', 'Nederlandse Financieringsmaatschappij voor Ontwikkelingslanden NV (Netherlands Development Finance Company, 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='Please select any financial institutions (public or private) that have, or are considering extending loans or guarantees to the project.', max_length=113, verbose_name='Financial institutions'), + 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)"), + ("IFAD", "International Fund for Agricultural Development (IFAD)"), + ("IIB", "International Investment Bank (IIB)"), + ("IsDB", "Islamic Development Bank (IsDB)"), + ( + "FMO", + "Nederlandse Financieringsmaatschappij voor Ontwikkelingslanden NV (Netherlands Development Finance Company, 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="Please select any financial institutions (public or private) that have, or are considering extending loans or guarantees to the project.", + max_length=113, + verbose_name="Financial institutions", + ), ), migrations.AlterField( - model_name='casestudy', - name='financial_institutions_other', - field=models.TextField(blank=True, help_text='Please list any other financial institutions not listed above. Separate with a new line.', verbose_name='Financial institutions – other'), + model_name="casestudy", + name="financial_institutions_other", + field=models.TextField( + blank=True, + help_text="Please list any other financial institutions not listed above. Separate with a new line.", + verbose_name="Financial institutions – other", + ), ), migrations.AlterField( - model_name='casestudy', - name='full_description', - field=models.TextField(help_text='Please 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'), + model_name="casestudy", + name="full_description", + field=models.TextField( + help_text="Please 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_technology', - field=models.CharField(blank=True, choices=[('BIO', 'Bio-energy'), ('GEOT', 'Geothermal electricity'), ('Hydro', (('uHYD', 'Micro hydro (<100kW)'), ('SHYD', 'Small-scale hydro (100kW-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', 'Solar power tower'), ('PARA', 'Parabolic trough (open or enclosed)'), ('FRES', 'Fresnel reflector'), ('STIR', 'Dish Stirling'))), ('Wind', (('SSWE', 'Small-scale wind (<500kW)'), ('LSWE', 'Large-scale (more than 500kW)'))), ('OTHR', 'Other')], help_text='Please select the type of renewable energy generation that most applies to this case study.', max_length=4, verbose_name='Generation technology'), + 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 (100kW-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", "Solar power tower"), + ("PARA", "Parabolic trough (open or enclosed)"), + ("FRES", "Fresnel reflector"), + ("STIR", "Dish Stirling"), + ), + ), + ( + "Wind", + ( + ("SSWE", "Small-scale wind (<500kW)"), + ("LSWE", "Large-scale (more than 500kW)"), + ), + ), + ("OTHR", "Other"), + ], + help_text="Please select the type of renewable energy generation that most applies to this case study.", + max_length=4, + verbose_name="Generation technology", + ), ), migrations.AlterField( - model_name='casestudy', - name='generation_type', - field=models.CharField(blank=True, choices=[('POW', 'Electricity'), ('HOT', 'Heat/Cold'), ('CHP', 'Combined Heat/Cold and Power (CHP, CCP or CCHP)')], max_length=4, verbose_name='What kind of energy is generated?'), + model_name="casestudy", + name="generation_type", + field=models.CharField( + blank=True, + choices=[ + ("POW", "Electricity"), + ("HOT", "Heat/Cold"), + ("CHP", "Combined Heat/Cold and Power (CHP, CCP or CCHP)"), + ], + max_length=4, + verbose_name="What kind of energy is generated?", + ), ), 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 please 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?'), + 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 please 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_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.

", max_length=256, verbose_name='Land ownership/tenure details'), + 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.

", + max_length=256, + verbose_name="Land ownership/tenure details", + ), ), migrations.AlterField( - model_name='casestudy', - name='location_context', - field=models.CharField(choices=[('RUR', 'Rural'), ('URB', 'Urban'), ('MIX', 'Mixed')], help_text='Please select the context that is most applicable to this case study.', max_length=3, verbose_name='Location'), + model_name="casestudy", + name="location_context", + field=models.CharField( + choices=[("RUR", "Rural"), ("URB", "Urban"), ("MIX", "Mixed")], + help_text="Please select the context that is most applicable to this case study.", + max_length=3, + verbose_name="Location", + ), ), migrations.AlterField( - model_name='casestudy', - name='manufacturing_description', - field=models.TextField(blank=True, help_text='Please briefly describe manufacturing process and components/outputs. (less than 500 characters).', max_length=500, verbose_name='Description'), + model_name="casestudy", + name="manufacturing_description", + field=models.TextField( + blank=True, + help_text="Please briefly describe manufacturing process and components/outputs. (less than 500 characters).", + max_length=500, + verbose_name="Description", + ), ), migrations.AlterField( - 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', 'Others(s)')], max_length=128, verbose_name='Please choose the factors that make this case remarkable, in a positive or negative way.'), + 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", "Others(s)"), + ], + max_length=128, + verbose_name="Please choose the factors that make this case remarkable, in a positive or negative way.", + ), ), migrations.AlterField( - model_name='casestudy', - name='manufacturing_factors_description', - field=models.TextField(blank=True, verbose_name='Please describe these factors.'), + model_name="casestudy", + name="manufacturing_factors_description", + field=models.TextField( + blank=True, verbose_name="Please describe these factors." + ), ), migrations.AlterField( - model_name='casestudy', - name='manufacturing_related_tech', - field=multiselectfield.db.fields.MultiSelectField(blank=True, choices=[('PV', 'Solar PV'), ('CSP', 'Concentrated solar power (CSP)'), ('WIND', 'Wind energy'), ('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?'), + model_name="casestudy", + name="manufacturing_related_tech", + field=multiselectfield.db.fields.MultiSelectField( + blank=True, + choices=[ + ("PV", "Solar PV"), + ("CSP", "Concentrated solar power (CSP)"), + ("WIND", "Wind energy"), + ("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.AlterField( - 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?'), + 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='media_coverage_independent', - field=models.TextField(blank=True, help_text='Please provide any links to grassroots/independent media coverage.', verbose_name='Independent grassroots reports'), + model_name="casestudy", + name="media_coverage_independent", + field=models.TextField( + blank=True, + help_text="Please provide any links to grassroots/independent media coverage.", + verbose_name="Independent grassroots reports", + ), ), migrations.AlterField( - model_name='casestudy', - name='media_coverage_mainstream', - field=models.TextField(blank=True, help_text='Please provide any links to mainstream media coverage.', verbose_name='Links to media reports'), + model_name="casestudy", + name="media_coverage_mainstream", + field=models.TextField( + blank=True, + help_text="Please provide any links to mainstream media coverage.", + verbose_name="Links to media reports", + ), ), migrations.AlterField( - model_name='casestudy', - name='minerals_or_commodities', - field=models.CharField(blank=True, choices=[('ALU', 'Aluminium (Bauxite)'), ('ARS', 'Arsenic'), ('BER', 'Beryllium'), ('CAD', 'Cadmium'), ('CHR', 'Chromium'), ('COK', 'Coking 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 here?', max_length=3, verbose_name='Primary mineral mined'), + 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 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 here?", + 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='Please enter any mineral commodities not in the list. Separate each with a new line.', verbose_name='Other mineral commodities'), + model_name="casestudy", + name="minerals_or_commodities_other", + field=models.TextField( + blank=True, + help_text="Please 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, 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 organised 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?'), + 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, 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 organised 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='Please provide a detailed description of the socio-environmental impacts (all relevant details, such as type of ecosystem, presence of any existing reserve in the area, biodiversity impacts, new protection of lands/waters, total geographic footprint of the project, tenure system affected in the case of land grabs, etc.).', verbose_name='Describe the socio-environmental impacts (positive and negative):'), + model_name="casestudy", + name="negative_socioenvironmental_impacts", + field=models.TextField( + blank=True, + help_text="Please provide a detailed description of the socio-environmental impacts (all relevant details, such as type of ecosystem, presence of any existing reserve in the area, biodiversity impacts, new protection of lands/waters, total geographic footprint of the project, tenure system affected in the case of land grabs, etc.).", + verbose_name="Describe the socio-environmental impacts (positive and negative):", + ), ), migrations.AlterField( - model_name='casestudy', - name='official_project_documents', - field=models.ManyToManyField(blank=True, help_text='Please attach any legal or official documents that relate to the project.', related_name='official_project_document_for', to='files.File', verbose_name='Official project documents'), + model_name="casestudy", + name="official_project_documents", + field=models.ManyToManyField( + blank=True, + help_text="Please attach any legal or official documents that relate to the project.", + 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='Please attach any other documents that relate to the project.', related_name='other_document_for', to='files.File', verbose_name='Other documents'), + model_name="casestudy", + name="other_documents", + field=models.ManyToManyField( + blank=True, + help_text="Please attach any other documents that relate to the project.", + related_name="other_document_for", + to="files.File", + verbose_name="Other documents", + ), ), 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', 'Circular economy project / Reuse / Recycling')], max_length=32, verbose_name='What kind of case is this entry about?'), + 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", "Circular economy project / Reuse / Recycling"), + ], + max_length=32, + verbose_name="What kind of case is this entry about?", + ), ), migrations.AlterField( - model_name='casestudy', - name='power_technology', - field=models.CharField(blank=True, choices=[('PT', 'Electrical power transmission/distribution'), ('HN', 'Heat networks'), ('OT', 'Other')], max_length=2, verbose_name='Power technology'), + model_name="casestudy", + name="power_technology", + field=models.CharField( + blank=True, + choices=[ + ("PT", "Electrical power transmission/distribution"), + ("HN", "Heat networks"), + ("OT", "Other"), + ], + max_length=2, + verbose_name="Power technology", + ), ), migrations.AlterField( - model_name='casestudy', - name='project_owners', - field=models.TextField(blank=True, help_text='Please list companies or organisations that own the project. Write each name in a new line.', verbose_name='Project owners'), + model_name="casestudy", + name="project_owners", + field=models.TextField( + blank=True, + help_text="Please list companies or organisations that own the project. Write each name in a new line.", + verbose_name="Project owners", + ), ), migrations.AlterField( - model_name='casestudy', - name='project_status', - field=models.CharField(choices=[('INIT', 'Initial/conceptual'), ('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'), + model_name="casestudy", + name="project_status", + field=models.CharField( + choices=[ + ("INIT", "Initial/conceptual"), + ("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='Please describe the current situation and likely future scenarios.', verbose_name='Current status of the case'), + model_name="casestudy", + name="project_status_detail", + field=models.TextField( + blank=True, + help_text="Please 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='Please describe the projected production of commodities per annum and overall.
\nFor 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'), + model_name="casestudy", + name="projected_production_of_commodities", + field=models.CharField( + blank=True, + help_text='Please describe the projected production of commodities per annum and overall.
\nFor 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 renewable energy economy'), + 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 renewable energy economy", + ), ), migrations.AlterField( - model_name='casestudy', - name='shapefiles', - field=models.ManyToManyField(blank=True, help_text='For example, of the limits of the land within which a project is taking place, or of sites of particular importance. You can upload data in different formats (ESRI Shapefiles with file extensions like .cpg, .dbf, .prj, .qpj, .shp, .shx., or GeoPackage gpkg, GeoJSON, KML, GML, etc.). Write to database@ojuso.org if you need help.', related_name='shapefile_for', to='files.File', verbose_name='Do you have geographic information files about the territory impacted by this project?'), + model_name="casestudy", + name="shapefiles", + field=models.ManyToManyField( + blank=True, + help_text="For example, of the limits of the land within which a project is taking place, or of sites of particular importance. You can upload data in different formats (ESRI Shapefiles with file extensions like .cpg, .dbf, .prj, .qpj, .shp, .shx., or GeoPackage gpkg, GeoJSON, KML, GML, etc.). Write to database@ojuso.org if you need help.", + related_name="shapefile_for", + to="files.File", + verbose_name="Do you have geographic information files about the territory impacted by this project?", + ), ), migrations.AlterField( - model_name='casestudy', - name='shareholders', - field=models.TextField(blank=True, help_text='List the shareholders of the company/companies that own the project, if you have this information. Separate with a new line.', verbose_name='Shareholders of the project owners'), + model_name="casestudy", + name="shareholders", + field=models.TextField( + blank=True, + help_text="List the shareholders of the company/companies that own the project, if you have this information. Separate with a new line.", + verbose_name="Shareholders of the project owners", + ), ), migrations.AlterField( - model_name='casestudy', - name='size_of_concessions', - field=models.CharField(blank=True, help_text="Please describe the size of concession(s) granted to company/companies (e.g. 'one concession of 2,300 hectares (23km²)')", max_length=200, verbose_name='Size of concessions (land/marine area)'), + model_name="casestudy", + name="size_of_concessions", + field=models.CharField( + blank=True, + help_text="Please describe the size of concession(s) granted to company/companies (e.g. 'one concession of 2,300 hectares (23km²)')", + max_length=200, + verbose_name="Size of concessions (land/marine area)", + ), ), migrations.AlterField( - model_name='casestudy', - name='social_media_links', - field=models.TextField(blank=True, help_text='Please add any links to social media accounts directly relating to the project.', max_length=500, verbose_name='Social media links'), + model_name="casestudy", + name="social_media_links", + field=models.TextField( + blank=True, + help_text="Please add any links to social media accounts directly relating to the project.", + max_length=500, + verbose_name="Social media links", + ), ), migrations.AlterField( - model_name='casestudy', - name='start_year', - field=models.IntegerField(blank=True, choices=[(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), (2059, 2059)], help_text='Please 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'), + model_name="casestudy", + name="start_year", + field=models.IntegerField( + blank=True, + choices=[ + (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), + (2059, 2059), + ], + help_text="Please 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='synopsis', - field=models.TextField(help_text='Please briefly summarise the project. (Maximum 500 characters.)', max_length=500, verbose_name='Project synopsis'), + model_name="casestudy", + name="synopsis", + field=models.TextField( + help_text="Please briefly summarise the project. (Maximum 500 characters.)", + max_length=500, + verbose_name="Project synopsis", + ), ), migrations.AlterField( - model_name='casestudy', - name='total_generation_capacity', - field=models.PositiveIntegerField(blank=True, null=True, verbose_name='Total generation capacity (kW)'), + model_name="casestudy", + name="total_generation_capacity", + field=models.PositiveIntegerField( + blank=True, null=True, verbose_name="Total generation capacity (kW)" + ), ), migrations.AlterField( - model_name='casestudy', - name='total_investment', - field=models.IntegerField(blank=True, help_text='Please enter the approximate total investment for the project in United State Dollars (USD).', null=True, verbose_name='Total investment (in USD)'), + model_name="casestudy", + name="total_investment", + field=models.IntegerField( + blank=True, + help_text="Please enter the approximate total investment for the project in United State Dollars (USD).", + null=True, + verbose_name="Total investment (in USD)", + ), ), migrations.AlterField( - model_name='casestudy', - name='type_of_ecosystem', - field=multiselectfield.db.fields.MultiSelectField(blank=True, choices=[('MARINE', 'Marine (e.g. ocean, sea)'), ('FRESH', 'Freshwater (e.g. river, 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'), + 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. river, 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) tower'), ('EPT', 'Electrical power transmission/distribution infrastructure'), ('ESS', 'Energy storage'), ('GGM', 'Geothermal'), ('HGM', 'Hydropower'), ('HNT', 'Heat networks'), ('SPM', 'Solar photovoltaic'), ('STM', 'Solar thermal systems'), ('WTM', 'Wind energy'), ('ESS', "Don't know"), ('OTR', 'Other')], max_length=128, verbose_name='Potential use in renewable energy economy'), + model_name="casestudy", + name="use_in_energy_economy", + field=multiselectfield.db.fields.MultiSelectField( + blank=True, + choices=[ + ("CPV", "Concentrated solar power (CSP) tower"), + ( + "EPT", + "Electrical power transmission/distribution infrastructure", + ), + ("ESS", "Energy storage"), + ("GGM", "Geothermal"), + ("HGM", "Hydropower"), + ("HNT", "Heat networks"), + ("SPM", "Solar photovoltaic"), + ("STM", "Solar thermal systems"), + ("WTM", "Wind energy"), + ("ESS", "Don't know"), + ("OTR", "Other"), + ], + max_length=128, + verbose_name="Potential use in renewable energy economy", + ), ), migrations.AlterField( - model_name='casestudy', - name='wants_conversation_with_ojuso', - field=models.BooleanField(default=False, help_text='This would be a conversation about challenging or engaging related developers, companies and investors.', verbose_name='Would you like to have a conversation with the ojuso team?'), + model_name="casestudy", + name="wants_conversation_with_ojuso", + field=models.BooleanField( + default=False, + help_text="This would be a conversation about challenging or engaging related developers, companies and investors.", + verbose_name="Would you like to have a conversation with the ojuso team?", + ), ), 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? Please describe in your own words.', max_length=512, verbose_name='When did local organising efforts begin?'), + 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? Please describe in your own words.", + max_length=512, + verbose_name="When did local organising efforts begin?", + ), ), ] diff --git a/apps/map/migrations/0079_auto_20190407_1604.py b/apps/map/migrations/0079_auto_20190407_1604.py index f2d9f48..96c36fd 100644 --- a/apps/map/migrations/0079_auto_20190407_1604.py +++ b/apps/map/migrations/0079_auto_20190407_1604.py @@ -6,49 +6,192 @@ import multiselectfield.db.fields class Migration(migrations.Migration): - dependencies = [ - ('map', '0078_latest_form_changes'), - ] + dependencies = [("map", "0078_latest_form_changes")] operations = [ migrations.AlterField( - model_name='casestudy', - name='community_voices', - field=models.TextField(blank=True, help_text='Please add any direct quotes from members of the community that relate to this project.', verbose_name='Community Voices'), + model_name="casestudy", + name="community_voices", + field=models.TextField( + blank=True, + help_text="Please add any direct quotes from members of the community that relate to this project.", + verbose_name="Community Voices", + ), ), 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 (100kW-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', 'Solar power tower'), ('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')], help_text='Please select the type of renewable energy generation that most applies to this case study.', max_length=4, verbose_name='Generation technology'), + 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 (100kW-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", "Solar power tower"), + ("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"), + ], + help_text="Please 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='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='Please choose the factors that make this case remarkable, in a positive or negative way.'), + 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="Please choose the factors that make this case remarkable, in a positive or negative way.", + ), ), migrations.AlterField( - model_name='casestudy', - name='manufacturing_related_tech', - field=multiselectfield.db.fields.MultiSelectField(blank=True, choices=[('PV', 'Solar PV'), ('CSP', 'Concentrated solar power (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?'), + model_name="casestudy", + name="manufacturing_related_tech", + field=multiselectfield.db.fields.MultiSelectField( + blank=True, + choices=[ + ("PV", "Solar PV"), + ("CSP", "Concentrated solar power (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.AlterField( - model_name='casestudy', - name='name_of_territory_or_area', - field=models.CharField(blank=True, max_length=512, verbose_name='Name of territory or area'), + model_name="casestudy", + name="name_of_territory_or_area", + field=models.CharField( + blank=True, max_length=512, verbose_name="Name of territory or area" + ), ), migrations.AlterField( - model_name='casestudy', - name='negative_case_reasons', - field=multiselectfield.db.fields.MultiSelectField(blank=True, choices=[('VOLR', 'Violation of land rights'), ('VOHR', 'Violation of fundamental human rights, indigenous rights and/or other collective rights'), ('EIMP', 'Environmental impacts (severe impacts on ecosystems / violation of laws plans or programs of environmental conservation, 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?'), + 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, 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='type_of_ecosystem', - field=multiselectfield.db.fields.MultiSelectField(blank=True, choices=[('MARINE', 'Marine (e.g. ocean, sea)'), ('FRESH', 'Freshwater (e.g. river, 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'), + 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. river, 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) tower'), ('EPT', 'Electrical power transmission/distribution infrastructure'), ('ESS', 'Energy storage'), ('GGM', 'Geothermal'), ('HGM', 'Hydropower'), ('HNT', 'Heat networks'), ('SPM', 'Solar photovoltaic'), ('STM', 'Solar thermal systems'), ('WTM', 'Wind power'), ('ESS', "Don't know"), ('OTR', 'Other')], max_length=128, verbose_name='Potential use in renewable energy economy'), + model_name="casestudy", + name="use_in_energy_economy", + field=multiselectfield.db.fields.MultiSelectField( + blank=True, + choices=[ + ("CPV", "Concentrated solar power (CSP) tower"), + ( + "EPT", + "Electrical power transmission/distribution infrastructure", + ), + ("ESS", "Energy storage"), + ("GGM", "Geothermal"), + ("HGM", "Hydropower"), + ("HNT", "Heat networks"), + ("SPM", "Solar photovoltaic"), + ("STM", "Solar thermal systems"), + ("WTM", "Wind power"), + ("ESS", "Don't know"), + ("OTR", "Other"), + ], + max_length=128, + verbose_name="Potential use in renewable energy economy", + ), ), ] diff --git a/apps/map/models.py b/apps/map/models.py index 3234999..7058af3 100644 --- a/apps/map/models.py +++ b/apps/map/models.py @@ -16,9 +16,7 @@ from . import validators class CaseStudyDraft(models.Model): - author = models.ForeignKey( - User, on_delete=models.CASCADE - ) + author = models.ForeignKey(User, on_delete=models.CASCADE) created = models.DateTimeField(auto_now_add=True) @@ -33,7 +31,7 @@ class SpatialRefSys(connection.ops.spatial_ref_sys()): return self.__unicode__() def __unicode__(self): - return '{0.auth_name}:{0.auth_srid} {0.name}'.format(self) + return "{0.auth_name}:{0.auth_srid} {0.name}".format(self) class Meta: proxy = True @@ -42,9 +40,7 @@ class SpatialRefSys(connection.ops.spatial_ref_sys()): class CaseStudyQuerySet(models.QuerySet): def approved(self): - return self.filter( - approved=True - ) + return self.filter(approved=True) class CaseStudy(models.Model): @@ -54,259 +50,326 @@ class CaseStudy(models.Model): # Choice lists for drop-downs POSITIVE_NEGATIVE_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')) + ("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/state land')), - ('COM', _('Community/communal/customary land')), - ('CON', _('Contested/in conflict')), - ('OTH', _('Other')), + ("PRI", _("Private land")), + ("PUB", _("Public/state land")), + ("COM", _("Community/communal/customary land")), + ("CON", _("Contested/in conflict")), + ("OTH", _("Other")), ) LOCATION_CONTEXT_CHOICES = ( - ('RUR', _('Rural')), - ('URB', _('Urban')), - ('MIX', _('Mixed')), + ("RUR", _("Rural")), + ("URB", _("Urban")), + ("MIX", _("Mixed")), ) TYPE_OF_ECOSYSTEM_CHOICES = ( - ('MARINE', _('Marine (e.g. ocean, sea)')), - ('FRESH', _('Freshwater (e.g. river, lake)')), - ('FOREST', _('Forest/jungle')), - ('AGRI', _('Agricultural land')), - ('GRASS', _('Grassland')), - ('DESERT', _('Desert (tundra, ice or sand)')), - ('WETLND', _('Wetland (marsh, mangrove, peat Soil)')), - ('URBAN', _('Urban')) + ("MARINE", _("Marine (e.g. ocean, sea)")), + ("FRESH", _("Freshwater (e.g. river, lake)")), + ("FOREST", _("Forest/jungle")), + ("AGRI", _("Agricultural land")), + ("GRASS", _("Grassland")), + ("DESERT", _("Desert (tundra, ice or sand)")), + ("WETLND", _("Wetland (marsh, mangrove, peat Soil)")), + ("URBAN", _("Urban")), ) AFFECTED_COMMUNITIES_CHOICES = ( - ('INDIG', _('Indigenous people(s)')), - ('AFRO', _('Afro-descendants')), - ('MIG', _('Migrants')), - ('REF', _('Refugees')), - ('OTHER', _('Other communities or identities')), + ("INDIG", _("Indigenous people(s)")), + ("AFRO", _("Afro-descendants")), + ("MIG", _("Migrants")), + ("REF", _("Refugees")), + ("OTHER", _("Other communities or identities")), ) PROJECT_STATUS_CHOICES = ( - ('INIT', _('Initial/conceptual')), - ('PROJCD', _('In planning and design')), - ('FAIL', _('Failed')), - ('UCONST', _('Under construction')), - ('EXSTNG', _('In operation')), - ('DECOMM', _('Undergoing decommissioning')), - ('END', _('Decommissioned')), + ("INIT", _("Initial/conceptual")), + ("PROJCD", _("In planning and design")), + ("FAIL", _("Failed")), + ("UCONST", _("Under construction")), + ("EXSTNG", _("In operation")), + ("DECOMM", _("Undergoing decommissioning")), + ("END", _("Decommissioned")), ) FINANCIAL_INSTITUTIONS = ( - ('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)')), - ('IFAD', _('International Fund for Agricultural Development (IFAD)')), - ('IIB', _('International Investment Bank (IIB)')), - ('IsDB', _('Islamic Development Bank (IsDB)')), - ('FMO', _('Nederlandse Financieringsmaatschappij voor Ontwikkelingslanden NV (Netherlands Development Finance Company, 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')), + ("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)")), + ("IFAD", _("International Fund for Agricultural Development (IFAD)")), + ("IIB", _("International Investment Bank (IIB)")), + ("IsDB", _("Islamic Development Bank (IsDB)")), + ( + "FMO", + _( + "Nederlandse Financieringsmaatschappij voor Ontwikkelingslanden NV (Netherlands Development Finance Company, 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")), ) 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')) + ("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', _('Electricity')), - ('HOT', _('Heat/Cold')), - ('CHP', _('Combined Heat/Cold and Power (CHP, CCP or CCHP)')), + ("POW", _("Electricity")), + ("HOT", _("Heat/Cold")), + ("CHP", _("Combined Heat/Cold and Power (CHP, CCP or CCHP)")), ) GENERATION_TECHNOLOGY_CHOICES = ( - ('BIO', _('Bio-energy')), - ('GEOT', _('Geothermal electricity')), - (_('Hydro'), ( - ('uHYD', _('Micro hydro (<100kW)')), - ('SHYD', _('Small-scale hydro (100kW-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', _('Solar power tower')), - ('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')) + ("BIO", _("Bio-energy")), + ("GEOT", _("Geothermal electricity")), + ( + _("Hydro"), + ( + ("uHYD", _("Micro hydro (<100kW)")), + ("SHYD", _("Small-scale hydro (100kW-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", _("Solar power tower")), + ("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")), ) POWER_TECHNOLOGY_CHOICES = ( - ('PT', _('Electrical power transmission/distribution')), - ('HN', _('Heat networks')), - ('OT', _('Other')), + ("PT", _("Electrical power transmission/distribution")), + ("HN", _("Heat networks")), + ("OT", _("Other")), ) TYPE_OF_EXTRACTION_CHOICES = ( - ('SUR', _('Surface (open pit/open cast/open cut mining)')), - ('SUB', _('Sub-surface (underground mining)')), - ('SEA', _('Seabed mining')), - ('URB', _('Urban mining/recycling')) + ("SUR", _("Surface (open pit/open cast/open cut mining)")), + ("SUB", _("Sub-surface (underground mining)")), + ("SEA", _("Seabed mining")), + ("URB", _("Urban mining/recycling")), ) MINERAL_COMMODITY_CHOICES = ( - ('ALU', _('Aluminium (Bauxite)')), - ('ARS', _('Arsenic')), - ('BER', _('Beryllium')), - ('CAD', _('Cadmium')), - ('CHR', _('Chromium')), - ('COK', _('Coking 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')) + ("ALU", _("Aluminium (Bauxite)")), + ("ARS", _("Arsenic")), + ("BER", _("Beryllium")), + ("CAD", _("Cadmium")), + ("CHR", _("Chromium")), + ("COK", _("Coking 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")), ) USE_IN_ENERGY_ECONOMY_CHOICES = ( - ('CPV', _('Concentrated solar power (CSP) tower')), - ('EPT', _('Electrical power transmission/distribution infrastructure')), - ('ESS', _('Energy storage')), - ('GGM', _('Geothermal')), - ('HGM', _('Hydropower')), - ('HNT', _('Heat networks')), - ('SPM', _('Solar photovoltaic')), - ('STM', _('Solar thermal systems')), - ('WTM', _('Wind power')), - ('ESS', _("Don't know")), - ('OTR', _('Other')) + ("CPV", _("Concentrated solar power (CSP) tower")), + ("EPT", _("Electrical power transmission/distribution infrastructure")), + ("ESS", _("Energy storage")), + ("GGM", _("Geothermal")), + ("HGM", _("Hydropower")), + ("HNT", _("Heat networks")), + ("SPM", _("Solar photovoltaic")), + ("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')), + ("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', _('Concentrated solar power (CSP)')), - ('WIND', _('Wind power')), - ('HYDRO', _('Hydropower')), - ('GEO', _('Geothermal')), - ('TRANSMIT', _('Electrical power transmission/distribution infrastructure')), - ('STORE', _('Energy storage')), - ('HEAT', _('Heat networks')), - ('OTHER', _('Other')), - ('IDK', _('Unknown')), + ("PV", _("Solar PV")), + ("CSP", _("Concentrated solar power (CSP)")), + ("WIND", _("Wind power")), + ("HYDRO", _("Hydropower")), + ("GEO", _("Geothermal")), + ("TRANSMIT", _("Electrical power transmission/distribution 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)')), + ("LAND", _("Land use")), + ("LABOR", _("Labor rights")), + ("ENVIRO", _("Environmental factors")), + ("LIFECYCLE", _("Lifecycle management")), + ("OWN", _("Ownership")), + ("OTHER", _("Other(s)")), ) POSITIVE_CASE_TYPE_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', _('Circular economy project / Reuse / Recycling')), + ("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", _("Circular economy project / Reuse / Recycling")), ) NEGATIVE_CASE_REASONS_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, 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.')), + ("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, 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." + ), + ), ) # Dynamically generate a list of choices 40 years prior and after the current year. - YEAR_CHOICES = [(r, r) for r in - range((datetime.datetime.now().year - 40), - (datetime.datetime.now().year + 41))] + YEAR_CHOICES = [ + (r, r) + for r in range( + (datetime.datetime.now().year - 40), (datetime.datetime.now().year + 41) + ) + ] ## # Meta Fields @@ -314,18 +377,14 @@ class CaseStudy(models.Model): # User who submitted case study author = models.ForeignKey( - User, - on_delete=models.SET_NULL, - blank=True, - null=True, - editable=False + User, on_delete=models.SET_NULL, blank=True, null=True, editable=False ) # Date and time of submission date_created = models.DateTimeField(auto_now_add=True, null=False) # Slug derived from entry_name, used in urls for SEO - slug = AutoSlugField(populate_from=['entry_name'], editable=False) + slug = AutoSlugField(populate_from=["entry_name"], editable=False) # Language this case study is written in language = models.CharField(max_length=16, blank=True) @@ -337,9 +396,7 @@ class CaseStudy(models.Model): # Territory info ## - location = models.PointField( - verbose_name=_("Project location") - ) + location = models.PointField(verbose_name=_("Project location")) shapefiles_label = _( "Do you have geographic information files about the territory impacted by" @@ -355,28 +412,21 @@ class CaseStudy(models.Model): ) shapefiles = models.ManyToManyField( - 'files.File', - related_name='shapefile_for', + "files.File", + related_name="shapefile_for", verbose_name=shapefiles_label, help_text=shapefiles_help_text, - blank=True + blank=True, ) coordinate_reference_system = models.ForeignKey( - SpatialRefSys, - null=True, - blank=True, - default=4326, - on_delete=models.PROTECT + 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 + verbose_name=_("Name of territory or area"), max_length=512, blank=True ) - ## # First Screen - Basic information ## @@ -384,20 +434,22 @@ class CaseStudy(models.Model): # 1.1 entry_name = models.CharField( verbose_name=_("Project name"), - help_text=_("Please write the local name, followed by any translated name if necessary."), - max_length=128 + help_text=_( + "Please write the local name, followed by any translated name if necessary." + ), + max_length=128, ) # 1.4 country = CountryField( verbose_name=_("Country"), - help_text=_("Please select the country of the project.") + help_text=_("Please select the country of the project."), ) # 1.5.1 area_of_land = models.IntegerField( verbose_name=_("Approximate land area"), - help_text=_("The area of land covered by the project (km²)") + help_text=_("The area of land covered by the project (km²)"), ) # 1.5.2 @@ -405,18 +457,20 @@ class CaseStudy(models.Model): verbose_name=_("Land ownership/tenure"), help_text=_("What type of ownership/tenure does the land fall under?"), max_length=3, - choices=LAND_OWNERSHIP_CHOICES + choices=LAND_OWNERSHIP_CHOICES, ) # 1.5.3 land_ownership_details = models.TextField( verbose_name=_("Land ownership/tenure details"), - 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.

"), + 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.

" + ), max_length=256, blank=True, ) @@ -425,9 +479,10 @@ class CaseStudy(models.Model): location_context = models.CharField( verbose_name=_("Location"), help_text=_( - "Please select the context that is most applicable to this case study."), + "Please select the context that is most applicable to this case study." + ), max_length=3, - choices=LOCATION_CONTEXT_CHOICES + choices=LOCATION_CONTEXT_CHOICES, ) # 1.5.5 @@ -435,44 +490,47 @@ class CaseStudy(models.Model): verbose_name=_("Type(s) of ecosystem"), max_length=56, choices=TYPE_OF_ECOSYSTEM_CHOICES, - blank=True + blank=True, ) # 1.5.5.3 describe_ecosystem = models.TextField( - verbose_name=_("Please describe the ecosystem."), + verbose_name=_("Please describe the ecosystem.") ) affected_communities = MultiSelectField( verbose_name=_("Communities or identities present in the project area"), max_length=50, choices=AFFECTED_COMMUNITIES_CHOICES, - blank=True + blank=True, ) - people_affected_other = models.TextField( verbose_name=_("Communities or identities – further detail"), - help_text=_("Please describe further the communities or identities present in the project area."), - blank=True + 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"), max_length=6, - choices=PROJECT_STATUS_CHOICES + choices=PROJECT_STATUS_CHOICES, ) # 1.7 start_year = models.IntegerField( verbose_name=_("Construction start year"), - help_text=_("Please 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."), + help_text=_( + "Please 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 + null=True, ) # 1.8 @@ -481,99 +539,110 @@ class CaseStudy(models.Model): help_text=_( "Please 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."), + " is expected to begin as detailed in company information or media." + ), choices=YEAR_CHOICES, default=None, null=True, - blank=True + blank=True, ) # 1.9 synopsis = models.TextField( verbose_name=_("Project synopsis"), help_text=_("Please briefly summarise the project. (Maximum 500 characters.)"), - max_length=500 + max_length=500, ) # 1.10 full_description = models.TextField( verbose_name=_("Full description"), - help_text=_("Please describe the project in full. Separate paragraphs with two" - " new lines. Please add as much detail as you feel is necessary" - " here.") + help_text=_( + "Please 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 owners"), - help_text=_("Please list companies or organisations that own the project." - " Write each name in a new line."), - blank=True + help_text=_( + "Please list companies or organisations that own the project." + " Write each name in a new line." + ), + blank=True, ) consultants_contractors = models.TextField( verbose_name=_("Consultants and contractors"), - help_text=_("Please 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 + help_text=_( + "Please 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, ) # 1.12 shareholders = models.TextField( verbose_name=_("Shareholders of the project owners"), - help_text=_("List the shareholders of the company/companies that own the" - " project, if you have this information. Separate with a new line."), - blank=True + help_text=_( + "List the shareholders of the company/companies that own the" + " project, if you have this information. Separate with a new line." + ), + blank=True, ) # 1.13.1 financial_institutions = MultiSelectField( verbose_name=_("Financial institutions"), - help_text=_("Please select any financial institutions (public or private) that" - " have, or are considering extending loans or guarantees to the" - " project."), + help_text=_( + "Please select any financial institutions (public or private) that" + " have, or are considering extending loans or guarantees to the" + " project." + ), choices=FINANCIAL_INSTITUTIONS, - blank=True + blank=True, ) # 1.13.2 financial_institutions_other = models.TextField( verbose_name=_("Financial institutions – other"), - help_text=_("Please list any other financial institutions not listed above." - " Separate with a new line."), - blank=True + help_text=_( + "Please list any other financial institutions not listed above." + " Separate with a new line." + ), + blank=True, ) # 1.15.1, 1.15.2, 1.15.3 images = models.ManyToManyField( - 'files.ImageFile', - related_name='image_for', + "files.ImageFile", + related_name="image_for", verbose_name=_("Images"), - blank=True + blank=True, ) # 1.16.1 video = models.URLField( verbose_name=_("Video URL"), - help_text=_("Copy the URL to a YouTube or Vimeo video that relates to the case study."), + help_text=_( + "Copy the URL to a YouTube or Vimeo video that relates to the case study." + ), max_length=80, validators=[validators.YouTubeOrVimeoValidator()], - blank=True + blank=True, ) # 1.16.2 video_caption = models.CharField( - verbose_name=_("Video caption"), - max_length=240, - blank=True, + verbose_name=_("Video caption"), max_length=240, blank=True ) # 1.16.3 video_credit = models.CharField( - verbose_name=_("Video credit(s)"), - max_length=240, - blank=True, + verbose_name=_("Video credit(s)"), max_length=240, blank=True ) # 1.17.1 @@ -586,7 +655,9 @@ class CaseStudy(models.Model): # 1.17.2 media_coverage_independent = models.TextField( verbose_name=_("Independent grassroots reports"), - help_text=_("Please provide any links to grassroots/independent media coverage."), + help_text=_( + "Please provide any links to grassroots/independent media coverage." + ), blank=True, ) @@ -595,7 +666,8 @@ class CaseStudy(models.Model): verbose_name=_("Community Voices"), help_text=_( "Please add any direct quotes from members of the community that relate" - " to this project."), + " to this project." + ), blank=True, ) @@ -605,7 +677,8 @@ class CaseStudy(models.Model): help_text=_( "Please 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."), + " to upload, you can do this in 'other documents' on the 'uploads' tab." + ), blank=True, ) @@ -614,7 +687,8 @@ class CaseStudy(models.Model): verbose_name=_("Social media links"), help_text=_( "Please add any links to social media accounts directly relating" - " to the project."), + " to the project." + ), max_length=500, blank=True, ) @@ -626,38 +700,43 @@ class CaseStudy(models.Model): sector_of_economy = models.CharField( verbose_name=_("Sector of renewable energy economy"), max_length=3, - choices=SECTOR_CHOICES + choices=SECTOR_CHOICES, ) energy_details = models.CharField( verbose_name=_("Technology type"), - help_text=_("Please provide more information about the type of technology this case study focuses on."), + help_text=_( + "Please provide more information about the type of technology this case study focuses on." + ), max_length=200, - blank=True + blank=True, ) ## Energy generation project generation_type = models.CharField( - verbose_name=_('What kind of energy is generated?'), + verbose_name=_("What kind of energy is generated?"), max_length=4, choices=GENERATION_TYPE_CHOICES, - blank=True + blank=True, ) generation_technology = models.CharField( verbose_name=_("Generation technology"), - help_text=_("Please select the type of renewable energy generation that most" - " applies to this case study."), + help_text=_( + "Please select the type of renewable energy generation that most" + " applies to this case study." + ), max_length=4, choices=GENERATION_TECHNOLOGY_CHOICES, - blank=True + blank=True, ) # Should be filled in if generation_technology was answered as bio-energy biomass_detail = models.CharField( verbose_name=_("Bio-energy feedstock"), - help_text=_("
" + help_text=_( + "
" "

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

\n" "
    \n" @@ -669,9 +748,10 @@ class CaseStudy(models.Model): "
\n" "

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 + blank=True, ) # 1.14 @@ -682,14 +762,12 @@ class CaseStudy(models.Model): " national grid provider, or private companies. Also mention whether" " credits are being sold in the carbon markets. Separate with a new line." ), - blank=True + blank=True, ) # 2.1.2 total_generation_capacity = models.PositiveIntegerField( - verbose_name=_("Total generation capacity (kW)"), - blank=True, - null=True + verbose_name=_("Total generation capacity (kW)"), blank=True, null=True ) # 2.1.4 @@ -697,9 +775,10 @@ class CaseStudy(models.Model): verbose_name=_("Total investment (in USD)"), help_text=_( "Please enter the approximate total investment for the project in" - " United State Dollars (USD)."), + " United State Dollars (USD)." + ), blank=True, - null=True + null=True, ) # 2.2 - Power Grids / Energy Storage @@ -708,14 +787,14 @@ class CaseStudy(models.Model): verbose_name=_("Power technology"), max_length=2, choices=POWER_TECHNOLOGY_CHOICES, - blank=True + blank=True, ) # 2.2.1.4 power_technology_other = models.CharField( verbose_name=_("Further information about power technology"), max_length=128, - blank=True + blank=True, ) energy_storage_capacity = models.DecimalField( @@ -736,12 +815,14 @@ class CaseStudy(models.Model): # 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=_('Supplier of technology'), - help_text=_("Please list companies that supply the energy 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=_("Supplier of technology"), + help_text=_( + "Please list companies that supply the energy 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, ) @@ -750,8 +831,9 @@ class CaseStudy(models.Model): verbose_name=_("Additional technical or economic details"), help_text=_( "Please add any additional details that may help to explain the technical" - " and economic aspects of this case study."), - blank=True + " and economic aspects of this case study." + ), + blank=True, ) ## @@ -763,73 +845,76 @@ class CaseStudy(models.Model): help_text=_("What mineral commodity is primarily mined here?"), max_length=3, choices=MINERAL_COMMODITY_CHOICES, - blank=True + blank=True, ) minerals_or_commodities_other = models.TextField( verbose_name=_("Other mineral commodities"), help_text=_( "Please enter any mineral commodities not in the list." - " Separate each with a new line."), - blank=True + " Separate each with a new line." + ), + blank=True, ) use_in_energy_economy = MultiSelectField( verbose_name=_("Potential use in renewable energy economy"), max_length=128, choices=USE_IN_ENERGY_ECONOMY_CHOICES, - blank=True + blank=True, ) use_in_energy_economy_other = models.CharField( - verbose_name=_('Other'), - max_length=128, - blank=True + verbose_name=_("Other"), max_length=128, blank=True ) project_life_span = models.CharField( verbose_name=_("Project life span"), help_text=_("e.g. 12 years of production, 15 years overall"), max_length=200, - blank=True + blank=True, ) size_of_concessions = models.CharField( verbose_name=_("Size of concessions (land/marine area)"), help_text=_( "Please describe the size of concession(s) granted to company/companies" - " (e.g. 'one concession of 2,300 hectares (23km²)')"), + " (e.g. 'one concession of 2,300 hectares (23km²)')" + ), max_length=200, - blank=True + blank=True, ) projected_production_of_commodities = models.CharField( verbose_name=_("Estimated production of key commodities"), help_text=_( - 'Please describe the projected production of commodities per annum and' - ' overall.
\n' + "Please describe the projected production of commodities per annum and" + " overall.
\n" 'For example, "40 million tonnes of iron ore per year",' - ' "200 million tonnes over 5 year life of mine"."'), + ' "200 million tonnes over 5 year life of mine"."' + ), max_length=256, - blank=True + blank=True, ) type_of_extraction = models.CharField( verbose_name=_("Type of extraction"), max_length=3, choices=TYPE_OF_EXTRACTION_CHOICES, - blank=True + blank=True, ) associated_infrastructure = models.CharField( verbose_name=_("Associated infrastructure in the locality"), - help_text=_("Please list any associated infrastructure in the locality" - " (e.g. tailings dams / mine waste storage and treatment facilities;" - " ore processing facilities; smelting facilities;" - " hydroelectric dams / energy infrastructure;" - " transport infrastructure e.g. roads or rail)."), + help_text=_( + "Please list any associated infrastructure in the locality" + " (e.g. tailings dams / mine waste storage and treatment facilities;" + " ore processing facilities; smelting facilities;" + " hydroelectric dams / energy infrastructure;" + " transport infrastructure e.g. roads or rail)." + ), max_length=256, - blank=True + blank=True, ) ## Manufacturing @@ -838,57 +923,61 @@ class CaseStudy(models.Model): verbose_name=_("Which of the following options best describes this case?"), max_length=16, choices=MANUFACTURING_TYPE_CHOICES, - blank=True + blank=True, ) manufacturing_description = models.TextField( verbose_name=_("Description"), help_text=_( "Please briefly describe manufacturing process and components/outputs." - " (less than 500 characters)."), + " (less than 500 characters)." + ), max_length=500, - blank=True + blank=True, ) manufacturing_related_tech = MultiSelectField( verbose_name=_("What technology is this case related to?"), max_length=128, choices=MANUFACTURING_RELATED_CHOICES, - blank=True + blank=True, ) manufacturing_factors = MultiSelectField( verbose_name=_( "Please choose the factors that make this case remarkable, " - "in a positive or negative way."), + "in a positive or negative way." + ), max_length=128, choices=MANUFACTURING_FACTORS_CHOICES, - blank=True + blank=True, ) manufacturing_factors_description = models.TextField( - verbose_name=_("Please describe these factors."), - blank=True + verbose_name=_("Please 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 + 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?"), + verbose_name=_( + "What is the relationship of local community organization(s) to this project?" + ), max_length=1, - choices=POSITIVE_NEGATIVE_CHOICES + choices=POSITIVE_NEGATIVE_CHOICES, ) positive_case_type = MultiSelectField( - verbose_name=_('What kind of case is this entry about?'), + verbose_name=_("What kind of case is this entry about?"), choices=POSITIVE_CASE_TYPE_CHOICES, max_length=32, blank=True, @@ -897,67 +986,79 @@ class CaseStudy(models.Model): negative_case_reasons = MultiSelectField( verbose_name=("What kind of case is this entry about?"), choices=NEGATIVE_CASE_REASONS_CHOICES, - blank=True + blank=True, ) socioeconomic_benefits = models.TextField( - verbose_name=_('Socio-economic impacts'), - blank=True + verbose_name=_("Socio-economic impacts"), blank=True ) negative_socioenvironmental_impacts = models.TextField( - verbose_name=_("Describe the socio-environmental impacts (positive and negative):"), + verbose_name=_( + "Describe the socio-environmental impacts (positive and negative):" + ), help_text=_( "Please provide a detailed description of the socio-environmental impacts" " (all relevant details, such as type of ecosystem, presence of any" " existing reserve in the area, biodiversity impacts, new protection of" " lands/waters, total geographic footprint of the project," - " tenure system affected in the case of land grabs, etc.)."), - blank=True + " tenure system affected in the case of land grabs, etc.)." + ), + blank=True, ) isolated_or_widespread = models.TextField( - verbose_name=_("Is the project part of developments which are causing a cumulative effect?"), + 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 please describe them? Is there an" - " analysis of cumulative or synergetic effects?"), - blank=True + " analysis of cumulative or synergetic effects?" + ), + blank=True, ) key_actors_involved = models.TextField( - verbose_name=_('Key actors involved (individual/organisational)'), - blank=True + verbose_name=_("Key actors involved (individual/organisational)"), blank=True ) project_status_detail = models.TextField( - verbose_name=_('Current status of the case'), - help_text=_("Please describe the current situation and likely future scenarios."), - blank=True + verbose_name=_("Current status of the case"), + help_text=_( + "Please describe the current situation and likely future scenarios." + ), + blank=True, ) 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.'), + 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 + blank=True, ) identified_partnerships = models.CharField( - verbose_name=_('Identified partnerships'), - 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.'), + verbose_name=_("Identified partnerships"), + 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 + blank=True, ) # 3.2.1.9 negative_case_reasons_other = models.CharField( verbose_name=_("Other reason for negative case"), - help_text=_("For negative impacts you need to focus on substantive impacts on vulnerable groups."), + help_text=_( + "For negative impacts you need to focus on substantive impacts on vulnerable groups." + ), max_length=512, - blank=True + blank=True, ) # 3.2.4.1 @@ -965,90 +1066,85 @@ class CaseStudy(models.Model): verbose_name=_("When did local organising efforts begin?"), help_text=_( "Before the project started? During project implementation?" - " After project implementation? Please describe in your own words."), + " After project implementation? Please describe in your own words." + ), max_length=512, - blank=True + blank=True, ) # 3.2.4.2 who_has_been_involved = models.TextField( - verbose_name=_("Which communities, groups and organisations have been involved?"), - blank=True + verbose_name=_( + "Which communities, groups and organisations have been involved?" + ), + blank=True, ) # 3.2.4.3 participation_mechanisms = models.TextField( verbose_name=_("What mechanisms of participation have been used?"), - help_text=_("e.g. direct action, local referendums, legal cases," - " letters or petitions, etc."), - blank=True + help_text=_( + "e.g. direct action, local referendums, legal cases," + " letters or petitions, etc." + ), + blank=True, ) # 3.2.7 wants_conversation_with_ojuso = models.BooleanField( verbose_name=_( - "Would you like to have a conversation with the ojuso team?"), + "Would you like to have a conversation with the ojuso team?" + ), help_text=_( "This would be a conversation about challenging or engaging related" - " developers, companies and investors."), - default=False + " developers, companies and investors." + ), + default=False, ) - ## # Contact details ## - contact_email = models.EmailField( - verbose_name=_('Email address'), - blank=True - ) + contact_email = models.EmailField(verbose_name=_("Email address"), blank=True) contact_phone = PhoneNumberField( - verbose_name=_('Phone number'), + verbose_name=_("Phone number"), help_text=_('Please include the international prefix, beginning with "+".'), - blank=True + blank=True, ) - contact_website = models.URLField( - verbose_name=_('Website'), - blank=True - ) + contact_website = models.URLField(verbose_name=_("Website"), blank=True) contact_twitter = models.CharField( - verbose_name=_('Twitter username'), - max_length=50, - blank=True + verbose_name=_("Twitter username"), max_length=50, blank=True ) - contact_facebook = models.URLField( - verbose_name=_('Facebook page'), - blank=True - ) + contact_facebook = models.URLField(verbose_name=_("Facebook page"), blank=True) contact_other = models.TextField( - verbose_name=_('Other contact details'), - blank=True + verbose_name=_("Other contact details"), blank=True ) - ## # Uploads ## # 4.1 official_project_documents = models.ManyToManyField( - 'files.File', - related_name='official_project_document_for', + "files.File", + related_name="official_project_document_for", verbose_name=_("Official project documents"), - help_text=_("Please attach any legal or official documents that relate to the project."), + help_text=_( + "Please attach any legal or official documents that relate to the project." + ), blank=True, ) # 4.2 other_documents = models.ManyToManyField( - 'files.File', - related_name='other_document_for', + "files.File", + related_name="other_document_for", verbose_name=_("Other documents"), help_text=_("Please attach any other documents that relate to the project."), blank=True, @@ -1056,15 +1152,14 @@ class CaseStudy(models.Model): # 4.4 shown_on_other_platforms = models.BooleanField( - verbose_name=_("Is this case study shown on other platforms?"), - default=True + verbose_name=_("Is this case study shown on other platforms?"), default=True ) # 4.4.1 shown_on_other_platforms_detail = models.TextField( verbose_name=_("Shown on other platforms - Detail"), help_text=_("Please provide links to other places the case study appears."), - blank=True + blank=True, ) objects = CaseStudyQuerySet.as_manager() @@ -1100,19 +1195,17 @@ class CaseStudy(models.Model): return parse.urlparse(self.video).path class Meta: - verbose_name_plural = 'case studies' + verbose_name_plural = "case studies" class PointOfInterestQuerySet(models.QuerySet): def approved(self): - return self.filter( - approved=True - ) + return self.filter(approved=True) class PointOfInterest(models.Model): class Meta: - verbose_name_plural = 'points of interest' + verbose_name_plural = "points of interest" def __str__(self): return self.title @@ -1120,16 +1213,12 @@ class PointOfInterest(models.Model): objects = PointOfInterestQuerySet.as_manager() author = models.ForeignKey( - User, - models.SET_NULL, - blank=True, - null=True, - editable=False + User, models.SET_NULL, blank=True, null=True, editable=False ) date_created = models.DateTimeField(auto_now_add=True, null=False) - slug = AutoSlugField(populate_from=['title'], editable=False) + slug = AutoSlugField(populate_from=["title"], editable=False) approved = models.BooleanField(default=False) diff --git a/apps/map/urls.py b/apps/map/urls.py index c66356c..45dcab2 100644 --- a/apps/map/urls.py +++ b/apps/map/urls.py @@ -8,23 +8,48 @@ from .models import CaseStudy from . import views urlpatterns = [ - url(r'^$', RedirectView.as_view(url=reverse_lazy('map')), name='index'), - url(r'^case-study/create/?$', views.CreateCaseStudySelector.as_view(), name="create"), - url(r'^case-study/create/short/?$', views.CreateShortCaseStudy.as_view(), name='short-form'), - url(r'^case-study/create/long/?$', views.CreateLongCaseStudy.as_view(), name='long-form'), - url(r'^case-study/create/poi/?$', views.CreatePointOfInterest.as_view(), name='point-of-interest-form'), - url(r'^case-study/create/success/?$', views.CreateCaseStudySuccess.as_view(), name='form-success'), - url(r'^case-study/edit/(?P[\d]+)/?$', views.EditCaseStudy.as_view(), name='edit'), - + url(r"^$", RedirectView.as_view(url=reverse_lazy("map")), name="index"), + url( + r"^case-study/create/?$", views.CreateCaseStudySelector.as_view(), name="create" + ), + url( + r"^case-study/create/short/?$", + views.CreateShortCaseStudy.as_view(), + name="short-form", + ), + url( + r"^case-study/create/long/?$", + views.CreateLongCaseStudy.as_view(), + name="long-form", + ), + url( + r"^case-study/create/poi/?$", + views.CreatePointOfInterest.as_view(), + name="point-of-interest-form", + ), + url( + r"^case-study/create/success/?$", + views.CreateCaseStudySuccess.as_view(), + name="form-success", + ), + url( + r"^case-study/edit/(?P[\d]+)/?$", views.EditCaseStudy.as_view(), name="edit" + ), # Case study drafts - url(r'^case-study/draft/?$', views.DraftsAPI.as_view(), name='drafts'), - + url(r"^case-study/draft/?$", views.DraftsAPI.as_view(), name="drafts"), # View case studies # This should be last so that the above options will be tried first! - url(r'^case-study/(?P[-\w]+)/?$', views.ViewCaseStudyDetail.as_view(), name='detail'), - url(r'^map/?$', views.Map.as_view(), name='map'), - + url( + r"^case-study/(?P[-\w]+)/?$", + views.ViewCaseStudyDetail.as_view(), + name="detail", + ), + url(r"^map/?$", views.Map.as_view(), name="map"), # API - url(r'^jsi18n/$', JavaScriptCatalog.as_view(), name='javascript-catalogue'), - url(r'^srs-autocomplete/$', views.SpatialRefSysAutocomplete.as_view(), name='srs-autocomplete'), + url(r"^jsi18n/$", JavaScriptCatalog.as_view(), name="javascript-catalogue"), + url( + r"^srs-autocomplete/$", + views.SpatialRefSysAutocomplete.as_view(), + name="srs-autocomplete", + ), ] diff --git a/apps/map/validators.py b/apps/map/validators.py index 77959ff..4959445 100644 --- a/apps/map/validators.py +++ b/apps/map/validators.py @@ -5,15 +5,19 @@ from django.core.validators import RegexValidator # - http://(www.)youtube.com/watch/Dhjiu89G3 # - http://youtu.be/Dhjiu89G3 + class YoutubeURLValidator(RegexValidator): - regex = r'https?:\/\/(((www.)?youtube.com\/((watch\?v=)|(watch\/)))|(youtu.be\/))([A-z0-9]{1,11}).+' + regex = r"https?:\/\/(((www.)?youtube.com\/((watch\?v=)|(watch\/)))|(youtu.be\/))([A-z0-9]{1,11}).+" + # Supported Vimeo formats: # - http://(www.)vimeo.com/258651879 # - http://player.vimeo.com/video/258651879 + class VimeoURLValidator(RegexValidator): - regex = r'https?:\/\/(player|www.)?vimeo.com\/([0-9]{1,11}).+' + regex = r"https?:\/\/(player|www.)?vimeo.com\/([0-9]{1,11}).+" + class YouTubeOrVimeoValidator(RegexValidator): - regex = r'https?:\/\/(player.|www.)?(vimeo\.com|youtu(be\.com|\.be))\/(video\/|embed\/|watch\?v=|v\/)?([A-Za-z0-9]{1,11}).+' + regex = r"https?:\/\/(player.|www.)?(vimeo\.com|youtu(be\.com|\.be))\/(video\/|embed\/|watch\?v=|v\/)?([A-Za-z0-9]{1,11}).+" diff --git a/apps/map/views.py b/apps/map/views.py index 77df1ff..4ddfe21 100644 --- a/apps/map/views.py +++ b/apps/map/views.py @@ -33,6 +33,7 @@ follow the below link to look over and approve it: """ + class Map(TemplateView): template_name = "map/index.html" @@ -43,8 +44,9 @@ class CreateCaseStudySelector(LoginRequiredMixin, TemplateView): class CreatePointOfInterest(LoginRequiredMixin, CreateView): """View for base case study form.""" - template_name = 'map/form-poi.html' - success_url = '/case-study/create/success/' + + template_name = "map/form-poi.html" + success_url = "/case-study/create/success/" model = PointOfInterest form_class = PointOfInterest @@ -54,12 +56,13 @@ def send_email(study_id): try: send_mail( - 'New case study submitted', - NOTIFY_MESSAGE % ( + "New case study submitted", + NOTIFY_MESSAGE + % ( settings.SITE_URL, - reverse('admin:map_casestudy_change', args=[study_id]) + reverse("admin:map_casestudy_change", args=[study_id]), ), - 'noreply@ojuso.org', + "noreply@ojuso.org", [settings.DATABASE_EMAIL], fail_silently=False, ) @@ -82,24 +85,20 @@ def delete_user_draft(user_id): class FilesHandlerMixin: def remove_bad_fields(self, form): - form.cleaned_data.pop('official_project_documents', None) - form.cleaned_data.pop('other_documents', None) - form.cleaned_data.pop('shapefiles', None) - form.cleaned_data.pop('images', None) + form.cleaned_data.pop("official_project_documents", None) + form.cleaned_data.pop("other_documents", None) + form.cleaned_data.pop("shapefiles", None) + form.cleaned_data.pop("images", None) def add_file_refs(self, form): - self.object.official_project_documents.set(form.cleaned_data.get( - 'official_project_documents_files', [] - )) - self.object.other_documents.set(form.cleaned_data.get( - 'other_documents_files', [] - )) - self.object.shapefiles.set(form.cleaned_data.get( - 'shapefiles_files', [] - )) - self.object.images.set(form.cleaned_data.get( - 'images_files', [] - )) + self.object.official_project_documents.set( + form.cleaned_data.get("official_project_documents_files", []) + ) + self.object.other_documents.set( + form.cleaned_data.get("other_documents_files", []) + ) + self.object.shapefiles.set(form.cleaned_data.get("shapefiles_files", [])) + self.object.images.set(form.cleaned_data.get("images_files", [])) def handle_files(self, form): self.remove_bad_fields(form) @@ -110,8 +109,9 @@ class FilesHandlerMixin: class BaseCreateForm(LoginRequiredMixin, FilesHandlerMixin, CreateView): """View for base case study form.""" - template_name = 'map/form-case_study.html' - success_url = reverse_lazy('form-success') + + template_name = "map/form-case_study.html" + success_url = reverse_lazy("form-success") model = CaseStudy def form_valid(self, form): @@ -130,18 +130,20 @@ class BaseCreateForm(LoginRequiredMixin, FilesHandlerMixin, CreateView): class CreateShortCaseStudy(BaseCreateForm): """View for short version of case study form.""" + form_class = ShortCaseStudyForm form_type = "short" class CreateLongCaseStudy(BaseCreateForm): """View for long version of case study form.""" + form_class = LongCaseStudyForm form_type = "long" class CreateCaseStudySuccess(TemplateView): - template_name = 'map/form-success.html' + template_name = "map/form-success.html" class ViewCaseStudyDetail(DetailView): @@ -152,8 +154,9 @@ class ViewCaseStudyDetail(DetailView): class BaseEditForm(LoginRequiredMixin, FilesHandlerMixin, UpdateView): """View for base case study form.""" - template_name = 'map/form-case_study.html' - success_url = reverse_lazy('form-success') + + template_name = "map/form-case_study.html" + success_url = reverse_lazy("form-success") model = CaseStudy def form_valid(self, form): @@ -175,9 +178,7 @@ class EditCaseStudy(UserPassesTestMixin, BaseEditForm): else: author = -1 - return self.request.user.is_authenticated and ( - author is self.request.user.id - ) + return self.request.user.is_authenticated and (author is self.request.user.id) class SpatialRefSysAutocomplete(autocomplete.Select2QuerySetView): @@ -186,8 +187,7 @@ class SpatialRefSysAutocomplete(autocomplete.Select2QuerySetView): if self.q: qs = qs.filter( - Q(auth_name__icontains=self.q) - | Q(auth_srid__icontains=self.q) + Q(auth_name__icontains=self.q) | Q(auth_srid__icontains=self.q) ) return qs @@ -210,7 +210,7 @@ class DraftsAPI(LoginRequiredMixin, View): draft = self.get_object(request) if draft == None: - return HttpResponse(status=404) # Not Found + return HttpResponse(status=404) # Not Found else: return HttpResponse(draft.data, content_type="application/json") @@ -222,11 +222,11 @@ class DraftsAPI(LoginRequiredMixin, View): # If there isn't, create a new draft... draft = CaseStudyDraft(author=request.user, data=request.body.decode()) draft.save() - return HttpResponse(status=201) # Created + return HttpResponse(status=201) # Created else: draft.data = request.body.decode() draft.save() - return HttpResponse(status=200) # OK + return HttpResponse(status=200) # OK def delete(self, request): draft = self.get_object(request) @@ -234,23 +234,27 @@ class DraftsAPI(LoginRequiredMixin, View): if draft != None: data = json.loads(draft.data) - for k in [ 'official_project_documents', 'other_documents', - 'shapefiles', 'images' ]: + for k in [ + "official_project_documents", + "other_documents", + "shapefiles", + "images", + ]: try: - keyname = k + '_files' - field = data['data']['form'][keyname] + keyname = k + "_files" + field = data["data"]["form"][keyname] # Ignore empty fields - if field['value'] == '': + if field["value"] == "": continue - file_list = json.loads(field['value']) + file_list = json.loads(field["value"]) # Delete those items for item in file_list: try: - f = File.objects.get(id=item['id']) + f = File.objects.get(id=item["id"]) if f.user != self.request.user: continue f.delete() @@ -260,7 +264,6 @@ class DraftsAPI(LoginRequiredMixin, View): except: continue - draft.delete() return HttpResponse(status=204) diff --git a/apps/map/widgets.py b/apps/map/widgets.py index 84b3eba..ea1b69e 100644 --- a/apps/map/widgets.py +++ b/apps/map/widgets.py @@ -7,19 +7,19 @@ from apps.files.models import File class CommaSeparatedTextInput(widgets.HiddenInput): def format_value(self, value): try: - value = ','.join(value) + value = ",".join(value) except TypeError: - value = '' + value = "" return super().format_value(value) def value_from_datadict(self, data, files, name): value = super().value_from_datadict(data, files, name) - if value == '': + if value == "": return None try: - return value.split(',') + return value.split(",") except AttributeError: return None @@ -33,23 +33,22 @@ def idToDict(id): # the canonical format is a list of integers (IDs of files) # the input/display format is a string containing a JSON list of {id=x, name=y} objects class JSONFileListWidget(widgets.HiddenInput): - def format_value(self, value): try: - value = [ idToDict(id) for id in value ] + value = [idToDict(id) for id in value] value = json.dumps(value) except TypeError: - value = '' + value = "" return super().format_value(value) def value_from_datadict(self, data, files, name): value = super().value_from_datadict(data, files, name) - if value == '': + if value == "": return None try: filelist = json.loads(value) - return [ file['id'] for file in filelist ] + return [file["id"] for file in filelist] except JSONDecodeError: return None diff --git a/apps/profiles/apps.py b/apps/profiles/apps.py index 5501fda..61722aa 100644 --- a/apps/profiles/apps.py +++ b/apps/profiles/apps.py @@ -2,4 +2,4 @@ from django.apps import AppConfig class ProfilesConfig(AppConfig): - name = 'profiles' + name = "profiles" diff --git a/apps/profiles/forms.py b/apps/profiles/forms.py index acf04b8..93d250a 100644 --- a/apps/profiles/forms.py +++ b/apps/profiles/forms.py @@ -4,4 +4,4 @@ from django.contrib.auth import get_user_model class UpdateProfile(ModelForm): class Meta: - model = get_user_model() \ No newline at end of file + model = get_user_model() diff --git a/apps/profiles/urls.py b/apps/profiles/urls.py index 543b98b..7ca37f7 100644 --- a/apps/profiles/urls.py +++ b/apps/profiles/urls.py @@ -2,22 +2,10 @@ from django.conf.urls import url from . import views -app_name = 'profiles' +app_name = "profiles" urlpatterns = [ - url( - regex=r'^~redirect/$', - view=views.UserRedirectView.as_view(), - name='redirect' - ), - url( - regex=r'^$', - view=views.UserDetailView.as_view(), - name='detail' - ), - url( - regex=r'^~update/$', - view=views.UserUpdateView.as_view(), - name='update' - ), + url(regex=r"^~redirect/$", view=views.UserRedirectView.as_view(), name="redirect"), + url(regex=r"^$", view=views.UserDetailView.as_view(), name="detail"), + url(regex=r"^~update/$", view=views.UserUpdateView.as_view(), name="update"), ] diff --git a/apps/profiles/views.py b/apps/profiles/views.py index 60623dd..b92d659 100644 --- a/apps/profiles/views.py +++ b/apps/profiles/views.py @@ -17,8 +17,8 @@ from apps.map.models import CaseStudy class UserDetailView(LoginRequiredMixin, DetailView): model = get_user_model() # These next two lines tell the view to index lookups by username - slug_field = 'username' - slug_url_kwarg = 'username' + slug_field = "username" + slug_url_kwarg = "username" def get_object(self): return get_user_model().objects.get(username=self.request.user.username) @@ -28,9 +28,9 @@ class UserDetailView(LoginRequiredMixin, DetailView): # Get case studies for this user case_studies = CaseStudy.objects.filter(author=self.request.user.id) - context['case_studies'] = case_studies + context["case_studies"] = case_studies - context['enable_edit'] = settings.FF_CAN_EDIT + context["enable_edit"] = settings.FF_CAN_EDIT return context @@ -39,19 +39,19 @@ class UserRedirectView(LoginRequiredMixin, RedirectView): permanent = False def get_redirect_url(self): - return reverse('profile:detail') + return reverse("profile:detail") class UserUpdateView(LoginRequiredMixin, UpdateView): - fields = ['first_name', 'last_name'] + fields = ["first_name", "last_name"] # we already imported User in the view code above, remember? model = get_user_model() # send the user back to their own page after a successful update def get_success_url(self): - return reverse('profile:detail') + return reverse("profile:detail") def get_object(self): # Only get the User record for the user making the request @@ -61,5 +61,5 @@ class UserUpdateView(LoginRequiredMixin, UpdateView): class UserListView(LoginRequiredMixin, ListView): model = get_user_model() # These next two lines tell the view to index lookups by username - slug_field = 'username' - slug_url_kwarg = 'username' + slug_field = "username" + slug_url_kwarg = "username" diff --git a/ojusomap/settings.py b/ojusomap/settings.py index b95634c..f20c696 100644 --- a/ojusomap/settings.py +++ b/ojusomap/settings.py @@ -23,110 +23,113 @@ BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) # SECURITY WARNING: keep the secret key used in production secret! SECRET_KEY = os.getenv( - 'SECRET_KEY', - 'r3vwfrawmnwh3kzp4(p#sg0!y%!jg80k06(j@p!y(q^h@5y*lw' - ) + "SECRET_KEY", "r3vwfrawmnwh3kzp4(p#sg0!y%!jg80k06(j@p!y(q^h@5y*lw" +) # SECURITY WARNING: don't run with debug turned on in production! -DEBUG = bool(int(os.getenv('DEBUG', False))) +DEBUG = bool(int(os.getenv("DEBUG", False))) if DEBUG: - ALLOWED_HOSTS = ['*'] + ALLOWED_HOSTS = ["*"] else: - ALLOWED_HOSTS = os.getenv('ALLOWED_HOSTS', 'localhost').split() + ALLOWED_HOSTS = os.getenv("ALLOWED_HOSTS", "localhost").split() # Application definition INSTALLED_APPS = [ - 'apps.contact', - 'apps.files', - 'apps.map', - 'apps.profiles', - 'avatar', - 'bootstrap3', - 'cas_server', - 'compressor', - 'crispy_forms', - 'dal', - 'dal_select2', - 'django.contrib.admin', - 'django.contrib.auth', - 'django.contrib.contenttypes', - 'django.contrib.flatpages', - 'django.contrib.gis', - 'django.contrib.humanize', - 'django.contrib.messages', - 'django.contrib.sessions', - 'django.contrib.sites', - 'django.contrib.staticfiles', - 'django_extensions', - 'envelope', - 'leaflet', - 'raven.contrib.django.raven_compat', - 'registration', - 'rest_framework', - 'rest_framework_gis', - 'storages', - 'whitenoise.runserver_nostatic', - 'anymail', + "apps.contact", + "apps.files", + "apps.map", + "apps.profiles", + "avatar", + "bootstrap3", + "cas_server", + "compressor", + "crispy_forms", + "dal", + "dal_select2", + "django.contrib.admin", + "django.contrib.auth", + "django.contrib.contenttypes", + "django.contrib.flatpages", + "django.contrib.gis", + "django.contrib.humanize", + "django.contrib.messages", + "django.contrib.sessions", + "django.contrib.sites", + "django.contrib.staticfiles", + "django_extensions", + "envelope", + "leaflet", + "raven.contrib.django.raven_compat", + "registration", + "rest_framework", + "rest_framework_gis", + "storages", + "whitenoise.runserver_nostatic", + "anymail", ] MIDDLEWARE = [ - 'django.middleware.security.SecurityMiddleware', - 'whitenoise.middleware.WhiteNoiseMiddleware', - 'django.contrib.sessions.middleware.SessionMiddleware', - 'django.middleware.locale.LocaleMiddleware', - 'django.middleware.common.CommonMiddleware', - 'django.middleware.csrf.CsrfViewMiddleware', - 'django.contrib.auth.middleware.AuthenticationMiddleware', - 'django.contrib.messages.middleware.MessageMiddleware', - 'django.middleware.clickjacking.XFrameOptionsMiddleware', - 'django.contrib.flatpages.middleware.FlatpageFallbackMiddleware', + "django.middleware.security.SecurityMiddleware", + "whitenoise.middleware.WhiteNoiseMiddleware", + "django.contrib.sessions.middleware.SessionMiddleware", + "django.middleware.locale.LocaleMiddleware", + "django.middleware.common.CommonMiddleware", + "django.middleware.csrf.CsrfViewMiddleware", + "django.contrib.auth.middleware.AuthenticationMiddleware", + "django.contrib.messages.middleware.MessageMiddleware", + "django.middleware.clickjacking.XFrameOptionsMiddleware", + "django.contrib.flatpages.middleware.FlatpageFallbackMiddleware", ] -ROOT_URLCONF = 'ojusomap.urls' +ROOT_URLCONF = "ojusomap.urls" SITE_ID = 1 -SITE_URL = 'https://map.ojuso.org' +SITE_URL = "https://map.ojuso.org" TEMPLATES = [ { - 'BACKEND': 'django.template.backends.django.DjangoTemplates', - 'DIRS': [os.path.join(BASE_DIR, 'ojusomap/templates/')], - 'APP_DIRS': True, - 'OPTIONS': { - 'context_processors': [ - 'django.template.context_processors.debug', - 'django.template.context_processors.request', - 'django.contrib.auth.context_processors.auth', - 'django.contrib.messages.context_processors.messages', - ], + "BACKEND": "django.template.backends.django.DjangoTemplates", + "DIRS": [os.path.join(BASE_DIR, "ojusomap/templates/")], + "APP_DIRS": True, + "OPTIONS": { + "context_processors": [ + "django.template.context_processors.debug", + "django.template.context_processors.request", + "django.contrib.auth.context_processors.auth", + "django.contrib.messages.context_processors.messages", + ] }, - }, + } ] -WSGI_APPLICATION = 'ojusomap.wsgi.application' +WSGI_APPLICATION = "ojusomap.wsgi.application" # E-Mail # https://docs.djangoproject.com/en/1.11/topics/email/ -ADMINS = [('Autonomic','autonomic-coop@posteo.net')] -DEFAULT_FROM_EMAIL = os.getenv('DEFAULT_FROM_EMAIL', 'webmaster@localhost') -EMAIL_HOST = os.getenv('EMAIL_HOST', 'localhost') -EMAIL_HOST_PASSWORD = os.getenv('EMAIL_HOST_PASSWORD') -EMAIL_HOST_USER = os.getenv('EMAIL_HOST_USER') -EMAIL_PORT = os.getenv('EMAIL_PORT', 25) -EMAIL_USE_TLS = bool(int(os.getenv('EMAIL_USE_TLS', False))) +ADMINS = [("Autonomic", "autonomic-coop@posteo.net")] +DEFAULT_FROM_EMAIL = os.getenv("DEFAULT_FROM_EMAIL", "webmaster@localhost") +EMAIL_HOST = os.getenv("EMAIL_HOST", "localhost") +EMAIL_HOST_PASSWORD = os.getenv("EMAIL_HOST_PASSWORD") +EMAIL_HOST_USER = os.getenv("EMAIL_HOST_USER") +EMAIL_PORT = os.getenv("EMAIL_PORT", 25) +EMAIL_USE_TLS = bool(int(os.getenv("EMAIL_USE_TLS", False))) EMAIL_SUBJECT_PREFIX = "Ojuso Platform" -SERVER_EMAIL = os.getenv('SERVER_EMAIL', 'root@localhost') +SERVER_EMAIL = os.getenv("SERVER_EMAIL", "root@localhost") -DATABASE_EMAIL = os.getenv('DATABASE_EMAIL', 'autonomic-coop@posteo.net') +DATABASE_EMAIL = os.getenv("DATABASE_EMAIL", "autonomic-coop@posteo.net") EMAIL_BACKEND = "anymail.backends.mailgun.EmailBackend" ANYMAIL = { - "MAILGUN_API_KEY": os.getenv("MAILGUN_API_KEY", "key-e82f77942478d2892b4faf51fc88ce45"), - "MAILGUN_SENDER_DOMAIN": os.getenv("MAILGUN_SENDER_DOMAIN", "sandbox35a5ee2a4dfc4f3aaf76d4672e4497ae.mailgun.org"), + "MAILGUN_API_KEY": os.getenv( + "MAILGUN_API_KEY", "key-e82f77942478d2892b4faf51fc88ce45" + ), + "MAILGUN_SENDER_DOMAIN": os.getenv( + "MAILGUN_SENDER_DOMAIN", "sandbox35a5ee2a4dfc4f3aaf76d4672e4497ae.mailgun.org" + ), } @@ -134,13 +137,13 @@ ANYMAIL = { # https://docs.djangoproject.com/en/1.11/ref/settings/#databases DATABASES = { - 'default': { - 'ENGINE': 'django.contrib.gis.db.backends.postgis', - 'HOST': os.getenv('DATABASE_HOST', 'localhost'), - 'PORT': os.getenv('DATABASE_PORT', '5432'), - 'NAME': os.getenv('DATABASE_NAME', 'postgres'), - 'USER': os.getenv('DATABASE_USER', 'postgres'), - 'PASSWORD': os.getenv('DATABASE_PASSWORD', 'postgres'), + "default": { + "ENGINE": "django.contrib.gis.db.backends.postgis", + "HOST": os.getenv("DATABASE_HOST", "localhost"), + "PORT": os.getenv("DATABASE_PORT", "5432"), + "NAME": os.getenv("DATABASE_NAME", "postgres"), + "USER": os.getenv("DATABASE_USER", "postgres"), + "PASSWORD": os.getenv("DATABASE_PASSWORD", "postgres"), } } @@ -149,17 +152,11 @@ DATABASES = { AUTH_PASSWORD_VALIDATORS = [ { - 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator', - }, - { - 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator', - }, - { - 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator', - }, - { - 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator', + "NAME": "django.contrib.auth.password_validation.UserAttributeSimilarityValidator" }, + {"NAME": "django.contrib.auth.password_validation.MinimumLengthValidator"}, + {"NAME": "django.contrib.auth.password_validation.CommonPasswordValidator"}, + {"NAME": "django.contrib.auth.password_validation.NumericPasswordValidator"}, ] # Registration (Redux) @@ -168,9 +165,9 @@ ACCOUNT_ACTIVATION_DAYS = 3 # Internationalization # https://docs.djangoproject.com/en/1.11/topics/i18n/ -LANGUAGE_CODE = 'en-gb' +LANGUAGE_CODE = "en-gb" -TIME_ZONE = 'UTC' +TIME_ZONE = "UTC" USE_I18N = True @@ -179,19 +176,17 @@ USE_L10N = True USE_TZ = True LANGUAGES = [ - ('en-gb', _('English (British)')), - ('fr', _('French')), - ('es', _('Spanish')), + ("en-gb", _("English (British)")), + ("fr", _("French")), + ("es", _("Spanish")), ] -LOCALE_PATHS = [ - os.path.join(BASE_DIR, 'support/locale') -] +LOCALE_PATHS = [os.path.join(BASE_DIR, "support/locale")] # Static files (CSS, JavaScript, Images) # https://docs.djangoproject.com/en/1.11/howto/static-files/ -DEFAULT_FILE_STORAGE = 'storages.backends.s3boto3.S3Boto3Storage' +DEFAULT_FILE_STORAGE = "storages.backends.s3boto3.S3Boto3Storage" AWS_S3_ENDPOINT_URL = "https://ojuso-media.nyc3.digitaloceanspaces.com" if DEBUG: @@ -205,35 +200,31 @@ AWS_ACCESS_KEY_ID = "RUZTFVKPCNJIWCVUVJFW" AWS_SECRET_ACCESS_KEY = "pTZAnmtvGzFBdI/jwtwRoFW5eK7eJ8FLFxr1/Jb+Yq4" AWS_DEFAULT_ACL = None -STATIC_ROOT = os.path.join(BASE_DIR, 'static/') -STATIC_URL = os.getenv("STATIC_URL", '/static/') -STATICFILES_DIRS = [ - os.path.join(BASE_DIR, "assets") -] +STATIC_ROOT = os.path.join(BASE_DIR, "static/") +STATIC_URL = os.getenv("STATIC_URL", "/static/") +STATICFILES_DIRS = [os.path.join(BASE_DIR, "assets")] STATICFILES_FINDERS = [ - 'django.contrib.staticfiles.finders.FileSystemFinder', - 'django.contrib.staticfiles.finders.AppDirectoriesFinder', + "django.contrib.staticfiles.finders.FileSystemFinder", + "django.contrib.staticfiles.finders.AppDirectoriesFinder", ] -STATICFILES_STORAGE = 'whitenoise.storage.CompressedManifestStaticFilesStorage' +STATICFILES_STORAGE = "whitenoise.storage.CompressedManifestStaticFilesStorage" -MEDIA_ROOT = os.path.join(BASE_DIR, 'media/') -MEDIA_URL = os.getenv("MEDIA_URL", "https://ojuso-media.nyc3.digitaloceanspaces.com/ojuso-media/") +MEDIA_ROOT = os.path.join(BASE_DIR, "media/") +MEDIA_URL = os.getenv( + "MEDIA_URL", "https://ojuso-media.nyc3.digitaloceanspaces.com/ojuso-media/" +) # Cache # https://docs.djangoproject.com/en/1.11/topics/cache/ if DEBUG: - CACHES = { - 'default': { - 'BACKEND': 'django.core.cache.backends.dummy.DummyCache', - } - } + CACHES = {"default": {"BACKEND": "django.core.cache.backends.dummy.DummyCache"}} else: CACHES = { - 'default': { - 'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache', - 'LOCATION': 'cache:11211', + "default": { + "BACKEND": "django.core.cache.backends.memcached.MemcachedCache", + "LOCATION": "cache:11211", } } @@ -242,111 +233,94 @@ else: REST_FRAMEWORK = { # Use Django's standard `django.contrib.auth` permissions, # or allow read-only access for unauthenticated users. - 'DEFAULT_PERMISSION_CLASSES': [ - 'rest_framework.permissions.DjangoModelPermissionsOrAnonReadOnly' + "DEFAULT_PERMISSION_CLASSES": [ + "rest_framework.permissions.DjangoModelPermissionsOrAnonReadOnly" ], - 'DEFAULT_RENDERER_CLASSES': ( - 'rest_framework.renderers.JSONRenderer', - ), - 'DEFAULT_PARSER_CLASSES': ( - 'rest_framework.parsers.JSONParser', - ) + "DEFAULT_RENDERER_CLASSES": ("rest_framework.renderers.JSONRenderer",), + "DEFAULT_PARSER_CLASSES": ("rest_framework.parsers.JSONParser",), } # Django Crispy Forms # http://django-crispy-forms.readthedocs.io/en/latest/ -CRISPY_TEMPLATE_PACK = 'bootstrap3' +CRISPY_TEMPLATE_PACK = "bootstrap3" # Django-Leaflet # https://django-leaflet.readthedocs.io/en/latest/ LEAFLET_CONFIG = { - 'MIN_ZOOM': 2, - 'MAX_ZOOM': 16, - 'TILES': [ - ('Default', 'https://{s}.tile.opentopomap.org/{z}/{x}/{y}.png', { - 'maxZoom': 17, - 'attribution': 'Map data: © OpenStreetMap, SRTM | Map style: © OpenTopoMap (CC-BY-SA)' - }), - ('English', 'https://{s}.basemaps.cartocdn.com/light_all/{z}/{x}/{y}{r}.png', { - 'attribution': '© OpenStreetMap © CARTO', - 'subdomains': 'abcd', - 'maxZoom': 19 - }), - ('Français', 'http://a.tile.openstreetmap.fr/osmfr/{z}/{x}/{y}.png', {}), + "MIN_ZOOM": 2, + "MAX_ZOOM": 16, + "TILES": [ + ( + "Default", + "https://{s}.tile.opentopomap.org/{z}/{x}/{y}.png", + { + "maxZoom": 17, + "attribution": 'Map data: © OpenStreetMap, SRTM | Map style: © OpenTopoMap (CC-BY-SA)', + }, + ), + ( + "English", + "https://{s}.basemaps.cartocdn.com/light_all/{z}/{x}/{y}{r}.png", + { + "attribution": '© OpenStreetMap © CARTO', + "subdomains": "abcd", + "maxZoom": 19, + }, + ), + ("Français", "http://a.tile.openstreetmap.fr/osmfr/{z}/{x}/{y}.png", {}), ], - 'PLUGINS': { - 'forms': { - 'auto-include': True - } - }, + "PLUGINS": {"forms": {"auto-include": True}}, } # Error reporting & logging RAVEN_CONFIG = { - 'dsn': os.getenv("RAVEN_DSN", ''), + "dsn": os.getenv("RAVEN_DSN", ""), # If you are using git, you can also automatically configure the # release based on the git info. - 'release': raven.fetch_git_sha(os.path.dirname(os.pardir)), + "release": raven.fetch_git_sha(os.path.dirname(os.pardir)), } LOGGING = { - 'version': 1, - 'disable_existing_loggers': not DEBUG, - 'root': { - 'level': 'WARNING', - 'handlers': ['sentry'], - }, - 'formatters': { - 'verbose': { - 'format': '%(levelname)s %(asctime)s %(module)s %(process)d %(thread)d %(message)s' - }, - }, - 'handlers': { - 'null': { - 'level': 'DEBUG', - 'class': 'logging.NullHandler', - }, - 'sentry': { - 'level': 'ERROR', - 'class': 'raven.contrib.django.raven_compat.handlers.SentryHandler', - }, - 'console': { - 'level': 'DEBUG', - 'class': 'logging.StreamHandler', - 'formatter': 'verbose' + "version": 1, + "disable_existing_loggers": not DEBUG, + "root": {"level": "WARNING", "handlers": ["sentry"]}, + "formatters": { + "verbose": { + "format": "%(levelname)s %(asctime)s %(module)s %(process)d %(thread)d %(message)s" } }, - 'loggers': { + "handlers": { + "null": {"level": "DEBUG", "class": "logging.NullHandler"}, + "sentry": { + "level": "ERROR", + "class": "raven.contrib.django.raven_compat.handlers.SentryHandler", + }, + "console": { + "level": "DEBUG", + "class": "logging.StreamHandler", + "formatter": "verbose", + }, + }, + "loggers": { # Silence SuspiciousOperation.DisallowedHost exception ('Invalid # HTTP_HOST' header messages). Set the handler to 'null' so we don't # get those annoying emails. # https://www.calazan.com/how-to-disable-the-invalid-http_host-header-emails-in-django/ - 'django.security.DisallowedHost': { - 'handlers': ['null'], - 'propagate': False, + "django.security.DisallowedHost": {"handlers": ["null"], "propagate": False}, + "django.db.backends": { + "level": "ERROR", + "handlers": ["console"], + "propagate": False, }, - 'django.db.backends': { - 'level': 'ERROR', - 'handlers': ['console'], - 'propagate': False, - }, - 'raven': { - 'level': 'DEBUG', - 'handlers': ['console'], - 'propagate': False, - }, - 'sentry.errors': { - 'level': 'DEBUG', - 'handlers': ['console'], - 'propagate': False, - }, - 'apps.map': { - 'level': 'DEBUG', - 'handlers': ['console'], - 'propagate': False, + "raven": {"level": "DEBUG", "handlers": ["console"], "propagate": False}, + "sentry.errors": { + "level": "DEBUG", + "handlers": ["console"], + "propagate": False, }, + "apps.map": {"level": "DEBUG", "handlers": ["console"], "propagate": False}, }, } @@ -356,9 +330,8 @@ AVATAR_CLEANUP_DELETED = True # Messages from django.contrib.messages import constants as messages -MESSAGE_TAGS = { - messages.ERROR: 'danger' -} + +MESSAGE_TAGS = {messages.ERROR: "danger"} # Feature flags FF_CAN_EDIT = False diff --git a/ojusomap/tests.py b/ojusomap/tests.py index 7040e4a..f597884 100644 --- a/ojusomap/tests.py +++ b/ojusomap/tests.py @@ -8,7 +8,8 @@ from selenium import webdriver from selenium.common import exceptions from selenium.webdriver.common.by import By from selenium.webdriver.support.expected_conditions import ( - staleness_of, visibility_of_element_located + staleness_of, + visibility_of_element_located, ) from selenium.webdriver.support.wait import WebDriverWait from selenium.webdriver.support.select import Select @@ -29,11 +30,11 @@ class SeleniumTest(LiveServerTestCase): # profile.set_preference("dom.forms.number", False) # cls.sl = webdriver.Firefox(profile) chrome_options = webdriver.ChromeOptions() - chrome_options.add_argument('--no-sandbox') + chrome_options.add_argument("--no-sandbox") # comment out this next line in order to see the tests running in a browser. # But be sure to put it back before comitting, or gitlab CI will fail. - chrome_options.add_argument('--headless') - chrome_options.add_argument('--disable-gpu') + chrome_options.add_argument("--headless") + chrome_options.add_argument("--disable-gpu") cls.sl = webdriver.Chrome(options=chrome_options) cls.sl.implicitly_wait(TIMEOUT) super(SeleniumTest, cls).setUpClass() @@ -44,23 +45,22 @@ class SeleniumTest(LiveServerTestCase): super(SeleniumTest, cls).tearDownClass() def setUp(self): - self.user = User.objects.create_superuser(username='test', password='test', - email='test@example.com') + self.user = User.objects.create_superuser( + username="test", password="test", email="test@example.com" + ) def _open(self, url): - self.sl.get('%s%s' % (self.live_server_url, url)) + self.sl.get("%s%s" % (self.live_server_url, url)) @contextmanager def wait_for_page_load(self, timeout=30): - old_page = self.sl.find_element_by_tag_name('html') + old_page = self.sl.find_element_by_tag_name("html") yield - WebDriverWait(self.sl, timeout).until( - staleness_of(old_page) - ) + WebDriverWait(self.sl, timeout).until(staleness_of(old_page)) - def _select_option(self, select, option, optgroup=''): + def _select_option(self, select, option, optgroup=""): if optgroup: - optgroup = '/optgroup' + optgroup = "/optgroup" self.sl.find_element_by_xpath( "//select[@id='%s']%s/option[text()='%s']" % (select, optgroup, option) ).click() @@ -70,115 +70,146 @@ class MapTest(SeleniumTest): def setUp(self): self.case_study = CaseStudy( approved=True, - entry_name='test', + entry_name="test", location='{"type": "Point", "coordinates": [0, 0]}', - sector_of_economy='RN', - positive_or_negative='P', - country='NZ', - area_of_land='100', - land_ownership='PRI', - location_context='URB', - describe_ecosystem='test', - project_status='EXSTNG', - synopsis='test', - full_description='test', - media_coverage_mainstream='test', - media_coverage_independent='test' + sector_of_economy="RN", + positive_or_negative="P", + country="NZ", + area_of_land="100", + land_ownership="PRI", + location_context="URB", + describe_ecosystem="test", + project_status="EXSTNG", + synopsis="test", + full_description="test", + media_coverage_mainstream="test", + media_coverage_independent="test", ) self.case_study.save() def login(self): - self.user = User.objects.create_superuser(username='test', password='test', email='test@example.com'); - self.sl.find_element_by_id('id_username').send_keys('test'); - self.sl.find_element_by_id('id_password').send_keys('test'); + self.user = User.objects.create_superuser( + username="test", password="test", email="test@example.com" + ) + self.sl.find_element_by_id("id_username").send_keys("test") + self.sl.find_element_by_id("id_password").send_keys("test") self.sl.find_element_by_css_selector('input[type="submit"]').click() - + def place_marker(self): # click the zoom out button enough to bring up the thing to draw marker then use it. # the headless browser needs time between each click or it does not show the draw-marker control. for i in range(0, 15): - self.sl.find_element_by_class_name('leaflet-control-zoom-in').click() - time.sleep(0.2) - self.sl.find_element_by_class_name('leaflet-draw-draw-marker').click() - self.sl.find_element_by_id('id_location-map').click() + self.sl.find_element_by_class_name("leaflet-control-zoom-in").click() + time.sleep(0.2) + self.sl.find_element_by_class_name("leaflet-draw-draw-marker").click() + self.sl.find_element_by_id("id_location-map").click() def test_form_will_show_error(self): - self._open('/en-gb/case-study/create/long'); - self.login(); + self._open("/en-gb/case-study/create/long") + self.login() # navigate to the last tab, where the submit button is self.sl.find_element_by_css_selector('a[href="#uploads"]').click() # click submit without filling in any fields - self.sl.find_element_by_id('submit-id-submit').click() - error_message = self.sl.find_element_by_class_name('has-error') + self.sl.find_element_by_id("submit-id-submit").click() + error_message = self.sl.find_element_by_class_name("has-error") self.assertTrue(error_message.is_displayed()) def test_short_form_will_submit(self): - self._open('/en-gb/case-study/create/short'); + self._open("/en-gb/case-study/create/short") self.login() self.place_marker() - 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_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('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('There is/was an organising process in favour of the project'); + 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_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( + "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( + "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.sl.find_element_by_id("id_area_of_land").submit() self.assertTrue("Thanks!" in self.sl.page_source, "Success message not shown") - self._open('/admin/map/casestudy/'); + self._open("/admin/map/casestudy/") self.assertTrue("Short Entry" in self.sl.page_source, "Case study not saved") def test_long_form_will_submit(self): - self._open('/en-gb/case-study/create/long'); + self._open("/en-gb/case-study/create/long") self.login() self.place_marker() - 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_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('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() - 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('There is/was an organising process in favour of the project'); + 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_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( + "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() + 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( + "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(); + self.sl.find_element_by_id("id_name_of_territory_or_area").submit() self.assertTrue("Thanks!" in self.sl.page_source, "Success message not shown") - self._open('/admin/map/casestudy/'); + self._open("/admin/map/casestudy/") self.assertTrue("Long Entry" in self.sl.page_source, "Case study not saved") def test_map(self): - self._open('/') + self._open("/") WebDriverWait(self.sl, 5).until( - visibility_of_element_located( - (By.CSS_SELECTOR, '.hello--hide') - ) + visibility_of_element_located((By.CSS_SELECTOR, ".hello--hide")) ) - self.sl.find_element_by_css_selector('.hello--hide').click() + self.sl.find_element_by_css_selector(".hello--hide").click() WebDriverWait(self.sl, 5).until( - visibility_of_element_located( - (By.CSS_SELECTOR, '.leaflet-marker-icon') - ) + visibility_of_element_located((By.CSS_SELECTOR, ".leaflet-marker-icon")) ) - self.sl.find_element_by_css_selector('.leaflet-marker-icon').click() + self.sl.find_element_by_css_selector(".leaflet-marker-icon").click() - details_link = self.sl.find_element_by_css_selector('.leaflet-popup-content a.btn') + details_link = self.sl.find_element_by_css_selector( + ".leaflet-popup-content a.btn" + ) self.assertTrue(details_link.is_displayed()) details_link.click() - self.assertTrue(self.sl.current_url.endswith('case-study/test')) - + self.assertTrue(self.sl.current_url.endswith("case-study/test")) diff --git a/ojusomap/urls.py b/ojusomap/urls.py index a890ba3..051ba4a 100644 --- a/ojusomap/urls.py +++ b/ojusomap/urls.py @@ -12,17 +12,17 @@ from .views import LanguageDropdownView urlpatterns = [ - url(r'^api/', include("apps.api.urls")), - url(r'^admin/', admin.site.urls), - url(r'^avatar/', include('avatar.urls')), - url(r'^cas/', include('cas_server.urls', namespace='cas_server')), - url(r'^files/', include('apps.files.urls')), - url(r'^set_language/(?P[^/]+)$', LanguageDropdownView.as_view()), + url(r"^api/", include("apps.api.urls")), + url(r"^admin/", admin.site.urls), + url(r"^avatar/", include("avatar.urls")), + url(r"^cas/", include("cas_server.urls", namespace="cas_server")), + url(r"^files/", include("apps.files.urls")), + url(r"^set_language/(?P[^/]+)$", LanguageDropdownView.as_view()), # url(r'^contact/', include('apps.contact.urls'), name="contact"), ] urlpatterns += i18n_patterns( - url(r'^accounts/profile/', include('apps.profiles.urls', namespace="profile")), - url(r'^accounts/', include('registration.backends.default.urls')), - url(r'', include('apps.map.urls'), name="map"), + url(r"^accounts/profile/", include("apps.profiles.urls", namespace="profile")), + url(r"^accounts/", include("registration.backends.default.urls")), + url(r"", include("apps.map.urls"), name="map"), ) diff --git a/ojusomap/views.py b/ojusomap/views.py index 119e411..7a80bf5 100644 --- a/ojusomap/views.py +++ b/ojusomap/views.py @@ -5,9 +5,9 @@ from django.views.generic import View class LanguageDropdownView(View): def get(self, request, *args, **kwargs): - lang_code = kwargs.get('language', None) + lang_code = kwargs.get("language", None) if lang_code is not None and translation.check_for_language(lang_code): request.POST = request.POST.copy() - request.POST['language'] = lang_code - request.method = 'POST' + request.POST["language"] = lang_code + request.method = "POST" return set_language(request)