]> git.parisson.com Git - mezzo.git/commitdiff
Adapt project model and dates
authorGuillaume Pellerin <guillaume.pellerin@ircam.fr>
Thu, 23 Mar 2017 09:39:56 +0000 (10:39 +0100)
committerGuillaume Pellerin <guillaume.pellerin@ircam.fr>
Thu, 23 Mar 2017 09:39:56 +0000 (10:39 +0100)
app/organization/core/models.py
app/organization/job/migrations/0012_auto_20170323_1039.py [new file with mode: 0644]
app/organization/network/migrations/0095_auto_20170323_1039.py [new file with mode: 0644]
app/organization/projects/forms.py
app/organization/projects/migrations/0055_auto_20170323_1039.py [new file with mode: 0644]
app/organization/projects/models.py

index 4de84a75f580e17008beefbcad58cbf5057001fa..8d7d31d7442ee958ad5988f149817a20104cdf1a 100644 (file)
@@ -246,7 +246,7 @@ class Link(URL):
 
 class Period(models.Model):
 
-    date_from = models.DateField(_('begin date'), null=True, blank=True)
+    date_from = models.DateField(_('start date'), null=True, blank=True)
     date_to = models.DateField(_('end date'), null=True, blank=True)
 
     class Meta:
diff --git a/app/organization/job/migrations/0012_auto_20170323_1039.py b/app/organization/job/migrations/0012_auto_20170323_1039.py
new file mode 100644 (file)
index 0000000..4a9004d
--- /dev/null
@@ -0,0 +1,20 @@
+# -*- coding: utf-8 -*-
+# Generated by Django 1.9.11 on 2017-03-23 09:39
+from __future__ import unicode_literals
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+    dependencies = [
+        ('organization-job', '0011_auto_20170105_1743'),
+    ]
+
+    operations = [
+        migrations.AlterField(
+            model_name='candidacy',
+            name='date_from',
+            field=models.DateField(blank=True, null=True, verbose_name='start date'),
+        ),
+    ]
diff --git a/app/organization/network/migrations/0095_auto_20170323_1039.py b/app/organization/network/migrations/0095_auto_20170323_1039.py
new file mode 100644 (file)
index 0000000..b586737
--- /dev/null
@@ -0,0 +1,25 @@
+# -*- coding: utf-8 -*-
+# Generated by Django 1.9.11 on 2017-03-23 09:39
+from __future__ import unicode_literals
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+    dependencies = [
+        ('organization-network', '0094_auto_20170323_0815'),
+    ]
+
+    operations = [
+        migrations.AlterField(
+            model_name='personactivity',
+            name='date_from',
+            field=models.DateField(blank=True, null=True, verbose_name='start date'),
+        ),
+        migrations.AlterField(
+            model_name='personactivityvacation',
+            name='date_from',
+            field=models.DateField(blank=True, null=True, verbose_name='start date'),
+        ),
+    ]
index 0a5b75b5a0ad09a1e8b7d215901571a5483401a6..92ebe66044b2da6983de03046e7c72ce452ddab3 100644 (file)
@@ -59,11 +59,12 @@ class ProjectForm(ModelForm):
         super(ProjectForm, self).__init__(*args, **kwargs)
         self.fields['title'].label = "Project name"
         self.fields['keywords'].help_text = "5 comma separated keywords"
+        self.fields['date_from'].help_text = "Project start date (DD/MM/YYYY)"
+        self.fields['date_to'].help_text = "Project end date (DD/MM/YYYY)"
 
     class Meta:
         model = Project
-        fields = ('title', 'keywords', 'website')
-
+        fields = ('title', 'keywords', 'website', 'date_from', 'date_to')
 
 
 class ProjectPublicDataInline(InlineFormSet):
diff --git a/app/organization/projects/migrations/0055_auto_20170323_1039.py b/app/organization/projects/migrations/0055_auto_20170323_1039.py
new file mode 100644 (file)
index 0000000..6cd57d0
--- /dev/null
@@ -0,0 +1,52 @@
+# -*- coding: utf-8 -*-
+# Generated by Django 1.9.11 on 2017-03-23 09:39
+from __future__ import unicode_literals
+
+import datetime
+from django.db import migrations, models
+from django.utils.timezone import utc
+
+
+class Migration(migrations.Migration):
+
+    dependencies = [
+        ('organization-projects', '0054_auto_20170323_0815'),
+    ]
+
+    operations = [
+        migrations.RemoveField(
+            model_name='projectpublicdata',
+            name='period',
+        ),
+        migrations.AddField(
+            model_name='projectpublicdata',
+            name='implementation_duration',
+            field=models.CharField(default='1', help_text='Possible duration of implementation in months (must be part of the project implementation workplan) (months)', max_length=128, verbose_name='implementation duration'),
+        ),
+        migrations.AddField(
+            model_name='projectpublicdata',
+            name='implementation_start_date',
+            field=models.DateField(default=datetime.datetime(2017, 3, 23, 9, 39, 34, 20133, tzinfo=utc), help_text='Possible start date of implementation (must be part of the project implementation workplan) (DD/MM/YYYY)', verbose_name='implementation start date'),
+            preserve_default=False,
+        ),
+        migrations.AlterField(
+            model_name='project',
+            name='date_from',
+            field=models.DateField(blank=True, null=True, verbose_name='start date'),
+        ),
+        migrations.AlterField(
+            model_name='projectcall',
+            name='date_from',
+            field=models.DateField(blank=True, null=True, verbose_name='start date'),
+        ),
+        migrations.AlterField(
+            model_name='projectresidency',
+            name='date_from',
+            field=models.DateField(blank=True, null=True, verbose_name='start date'),
+        ),
+        migrations.AlterField(
+            model_name='projectworkpackage',
+            name='date_from',
+            field=models.DateField(blank=True, null=True, verbose_name='start date'),
+        ),
+    ]
index 7be1b0a71509a99200725017f712a3b7b1aec447..90effc060f37e2feeede5c212e4529a490f853e7 100644 (file)
@@ -340,7 +340,8 @@ class ProjectPublicData(models.Model):
     technology_description = models.TextField(_('technology description'), help_text="Must include the elements to be made available to the artist with sufficient functional and implementation details for enabling him/her to elaborate his/her technical approach (100-200 words).")
     objectives_description = models.TextField(_('objectives description'), help_text="What the project is looking to gain from the collaboration and what kind of artist would be suitable (100 – 150 words).")
     resources_description = models.TextField(_('resource description'), help_text="Resources available to the artist -- e.g. office facility, studio facility, technical equipment, internet connection, laboratory, and periods of availability for artistic production, staff possibly allocated to the project, available budget for travel, consumables and equipment, etc... (50 – 100 words).")
-    period = models.CharField(_('period of implementation'), max_length=128, help_text="Possible period of implementation (must be part of the project implementation workplan)")
+    implementation_start_date = models.DateField(_('implementation start date'), help_text="Possible start date of implementation (must be part of the project implementation workplan) (DD/MM/YYYY)")
+    implementation_duration = models.CharField(_('implementation duration'), max_length=128, help_text="Possible duration of implementation in months (must be part of the project implementation workplan) (months)", default='1')
     image = models.FileField(_("Image"), max_length=1024, upload_to="user/images/%Y/%m/%d/", help_text="Representing the project")
     image_credits = models.CharField(_('Image credits'), max_length=256, null=True)