]> git.parisson.com Git - mezzo.git/commitdiff
Change user files paths
authorGuillaume Pellerin <guillaume.pellerin@ircam.fr>
Tue, 14 Mar 2017 18:24:54 +0000 (19:24 +0100)
committerGuillaume Pellerin <guillaume.pellerin@ircam.fr>
Tue, 14 Mar 2017 18:24:54 +0000 (19:24 +0100)
app/organization/core/models.py
app/organization/network/migrations/0092_auto_20170314_1918.py [new file with mode: 0644]
app/organization/projects/migrations/0053_auto_20170314_1918.py [new file with mode: 0644]
app/organization/projects/models.py

index e53ea76c3da49d8773bbcc23fcc2531081f8f0f3..4de84a75f580e17008beefbcad58cbf5057001fa 100644 (file)
@@ -140,7 +140,7 @@ class Image(Titled, Orderable):
 
 class UserImage(Titled, Orderable):
 
-    file = models.FileField(_("Image"), max_length=1024, upload_to="images")
+    file = models.FileField(_("Image"), max_length=1024, upload_to="user/images/%Y/%m/%d/")
     credits = models.CharField(_('credits'), max_length=256, blank=True, null=True)
 
     class Meta:
@@ -157,7 +157,7 @@ class UserImage(Titled, Orderable):
 
 class File(Titled, Orderable):
 
-    file = FileField(_("document"), max_length=1024, upload_to="Documents/%Y/%m/%d/")
+    file = FileField(_("document"), max_length=1024, upload_to="documents")
 
     class Meta:
         abstract = True
diff --git a/app/organization/network/migrations/0092_auto_20170314_1918.py b/app/organization/network/migrations/0092_auto_20170314_1918.py
new file mode 100644 (file)
index 0000000..f43f5f0
--- /dev/null
@@ -0,0 +1,20 @@
+# -*- coding: utf-8 -*-
+# Generated by Django 1.9.11 on 2017-03-14 18:18
+from __future__ import unicode_literals
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+    dependencies = [
+        ('organization-network', '0091_auto_20170313_1425'),
+    ]
+
+    operations = [
+        migrations.AlterField(
+            model_name='organizationuserimage',
+            name='file',
+            field=models.FileField(max_length=1024, upload_to='user/images/%Y/%m/%d/', verbose_name='Image'),
+        ),
+    ]
diff --git a/app/organization/projects/migrations/0053_auto_20170314_1918.py b/app/organization/projects/migrations/0053_auto_20170314_1918.py
new file mode 100644 (file)
index 0000000..6b735eb
--- /dev/null
@@ -0,0 +1,30 @@
+# -*- coding: utf-8 -*-
+# Generated by Django 1.9.11 on 2017-03-14 18:18
+from __future__ import unicode_literals
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+    dependencies = [
+        ('organization-projects', '0052_auto_20170314_1828'),
+    ]
+
+    operations = [
+        migrations.AlterField(
+            model_name='projectprivatedata',
+            name='commitment_letter',
+            field=models.FileField(help_text='Written on behalf of the whole project consortium, this letter will commit in implementing the collaboration of a residency application selected by the VERTIGO jury, on the conditions set by the project (in annex of letter: synthesis of all related information entered by project).', max_length=1024, upload_to='user/documents/%Y/%m/%d/', verbose_name='letter of commitment by the project coordinator'),
+        ),
+        migrations.AlterField(
+            model_name='projectpublicdata',
+            name='image',
+            field=models.FileField(help_text='Representing the project', max_length=1024, upload_to='user/images/%Y/%m/%d/', verbose_name='Image'),
+        ),
+        migrations.AlterField(
+            model_name='projectuserimage',
+            name='file',
+            field=models.FileField(max_length=1024, upload_to='user/images/%Y/%m/%d/', verbose_name='Image'),
+        ),
+    ]
index 1c28f7d9d3ef27f7d3892065cce718a045d39317..75116285534a32442a1d093c0831561ce4444a8a 100644 (file)
@@ -341,7 +341,7 @@ class ProjectPublicData(models.Model):
     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)")
-    image = models.FileField(_("Image"), max_length=1024, upload_to="images", help_text="Representing the project")
+    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, blank=True, null=True)
 
     class Meta:
@@ -355,7 +355,7 @@ class ProjectPrivateData(models.Model):
 
     description = models.TextField(_('project description'), help_text="(500 - 1000 words)")
     affiliation = models.CharField(_('affiliation'), max_length=512)
-    commitment_letter = models.FileField(_("letter of commitment by the project coordinator"), max_length=1024, upload_to="Documents/%Y/%m/%d/", help_text="Written on behalf of the whole project consortium, this letter will commit in implementing the collaboration of a residency application selected by the VERTIGO jury, on the conditions set by the project (in annex of letter: synthesis of all related information entered by project).")
+    commitment_letter = models.FileField(_("letter of commitment by the project coordinator"), max_length=1024, upload_to="user/documents/%Y/%m/%d/", help_text="Written on behalf of the whole project consortium, this letter will commit in implementing the collaboration of a residency application selected by the VERTIGO jury, on the conditions set by the project (in annex of letter: synthesis of all related information entered by project).")
     persons = models.CharField(_('persons'), max_length=512, help_text="First name and last name of the persons from organization / project who will be part preliminary of the project team (separated by a comma)")
 
     class Meta: