diff options
Diffstat (limited to 'archaeological_files')
| -rw-r--r-- | archaeological_files/locale/django.pot | 182 | ||||
| -rw-r--r-- | archaeological_files/migrations/0014_auto_20181017_1642.py | 36 | ||||
| -rw-r--r-- | archaeological_files/migrations/0015_auto_20181017_1854.py | 25 | ||||
| -rw-r--r-- | archaeological_files/tests.py | 2 |
4 files changed, 154 insertions, 91 deletions
diff --git a/archaeological_files/locale/django.pot b/archaeological_files/locale/django.pot index 007aea421..bf7e69caa 100644 --- a/archaeological_files/locale/django.pot +++ b/archaeological_files/locale/django.pot @@ -15,11 +15,11 @@ msgid "Full text search" msgstr "" #: forms.py:56 forms.py:212 forms.py:257 forms.py:411 forms.py:444 -#: models.py:208 templates/ishtar/sheet_file.html:190 +#: models.py:221 templates/ishtar/sheet_file.html:191 msgid "Year" msgstr "" -#: forms.py:57 forms.py:217 forms.py:259 models.py:210 +#: forms.py:57 forms.py:217 forms.py:259 models.py:223 msgid "Numeric reference" msgstr "" @@ -31,7 +31,7 @@ msgstr "" msgid "Parcel" msgstr "" -#: forms.py:64 forms.py:422 forms.py:455 models.py:696 +#: forms.py:64 forms.py:422 forms.py:455 models.py:717 msgid "Department" msgstr "" @@ -39,7 +39,7 @@ msgstr "" msgid "File name" msgstr "" -#: forms.py:66 forms.py:156 forms.py:223 models.py:218 +#: forms.py:66 forms.py:156 forms.py:223 models.py:231 msgid "File type" msgstr "" @@ -51,23 +51,23 @@ msgstr "" msgid "Saisine type" msgstr "" -#: forms.py:69 forms.py:313 models.py:63 models.py:249 +#: forms.py:69 forms.py:313 models.py:64 models.py:262 msgid "Permit type" msgstr "" -#: forms.py:71 forms.py:316 models.py:250 +#: forms.py:71 forms.py:316 models.py:263 msgid "Permit reference" msgstr "" -#: forms.py:72 forms.py:229 forms.py:373 models.py:279 +#: forms.py:72 forms.py:229 forms.py:373 models.py:292 msgid "Comment" msgstr "" -#: forms.py:74 templates/ishtar/sheet_file.html:166 +#: forms.py:74 templates/ishtar/sheet_file.html:167 msgid "In charge" msgstr "" -#: forms.py:81 forms.py:290 forms.py:466 models.py:225 +#: forms.py:81 forms.py:290 forms.py:466 models.py:238 msgid "General contractor" msgstr "" @@ -91,11 +91,11 @@ msgstr "" msgid "You should select a file." msgstr "" -#: forms.py:144 forms.py:221 models.py:258 +#: forms.py:144 forms.py:221 models.py:271 msgid "Creation date" msgstr "" -#: forms.py:145 forms.py:326 models.py:260 +#: forms.py:145 forms.py:326 models.py:273 msgid "Reception date" msgstr "" @@ -123,23 +123,23 @@ msgstr "" msgid "General" msgstr "" -#: forms.py:204 models.py:220 +#: forms.py:204 models.py:233 msgid "Person in charge" msgstr "" -#: forms.py:220 models.py:217 +#: forms.py:220 models.py:230 msgid "Name" msgstr "" -#: forms.py:225 models.py:262 +#: forms.py:225 models.py:275 msgid "Related file" msgstr "" -#: forms.py:233 models.py:270 +#: forms.py:233 models.py:283 msgid "Total surface (m2)" msgstr "" -#: forms.py:236 models.py:276 +#: forms.py:236 models.py:289 msgid "Main address" msgstr "" @@ -168,16 +168,16 @@ msgstr "" msgid "Preventive informations" msgstr "" -#: forms.py:302 models.py:237 +#: forms.py:302 models.py:250 msgid "Responsible for planning service" msgstr "" -#: forms.py:319 models.py:273 +#: forms.py:319 models.py:286 msgid "Total developed surface (m2)" msgstr "" #: forms.py:342 templates/ishtar/dashboards/dashboard_file.html:53 -#: templates/ishtar/sheet_file.html:121 +#: templates/ishtar/sheet_file.html:122 msgid "Research archaeology" msgstr "" @@ -185,15 +185,15 @@ msgstr "" msgid "Archaeological file - 045 - Research - General" msgstr "" -#: forms.py:351 models.py:282 +#: forms.py:351 models.py:295 msgid "Departments" msgstr "" -#: forms.py:360 models.py:291 +#: forms.py:360 models.py:304 msgid "Scientist in charge" msgstr "" -#: forms.py:362 models.py:285 +#: forms.py:362 models.py:298 msgid "Requested operation type" msgstr "" @@ -201,11 +201,11 @@ msgstr "" msgid "Lead organization" msgstr "" -#: forms.py:380 models.py:295 +#: forms.py:380 models.py:308 msgid "Classified area" msgstr "" -#: forms.py:382 models.py:297 +#: forms.py:382 models.py:310 msgid "Protected area" msgstr "" @@ -269,8 +269,8 @@ msgstr "" msgid "Archaeological file - Administrative act - General" msgstr "" -#: ishtar_menu.py:33 models.py:320 templates/ishtar/sheet_file.html:4 -#: wizards.py:152 wizards.py:162 +#: ishtar_menu.py:33 models.py:338 templates/ishtar/sheet_file.html:4 +#: wizards.py:156 wizards.py:166 msgid "Archaeological file" msgstr "" @@ -298,7 +298,7 @@ msgstr "" msgid "Administrative act" msgstr "" -#: ishtar_menu.py:77 +#: ishtar_menu.py:77 models.py:321 msgid "Documents" msgstr "" @@ -310,206 +310,206 @@ msgstr "" msgid "General informations" msgstr "" -#: ishtar_menu.py:89 models.py:321 +#: ishtar_menu.py:89 models.py:339 #: templates/ishtar/dashboards/dashboard_file.html:7 msgid "Archaeological files" msgstr "" -#: models.py:43 +#: models.py:44 msgid "Archaeological file type" msgstr "" -#: models.py:44 +#: models.py:45 msgid "Archaeological file types" msgstr "" -#: models.py:64 +#: models.py:65 msgid "Permit types" msgstr "" -#: models.py:74 +#: models.py:75 msgid "Delay (in days)" msgstr "" -#: models.py:127 +#: models.py:131 models.py:268 +msgid "Towns" +msgstr "" + +#: models.py:137 msgctxt "key for text search" msgid "year" msgstr "" -#: models.py:131 +#: models.py:141 msgctxt "key for text search" msgid "reference" msgstr "" -#: models.py:135 +#: models.py:145 msgctxt "key for text search" msgid "other-reference" msgstr "" -#: models.py:139 +#: models.py:149 msgctxt "key for text search" msgid "town" msgstr "" -#: models.py:143 +#: models.py:153 msgctxt "key for text search" msgid "parcel" msgstr "" -#: models.py:147 +#: models.py:157 msgctxt "key for text search" msgid "department" msgstr "" -#: models.py:151 +#: models.py:161 msgctxt "key for text search" msgid "name" msgstr "" -#: models.py:155 +#: models.py:165 msgctxt "key for text search" msgid "type" msgstr "" -#: models.py:159 +#: models.py:169 msgctxt "key for text search" msgid "active" msgstr "" -#: models.py:163 +#: models.py:173 msgctxt "key for text search" msgid "saisine-type" msgstr "" -#: models.py:167 +#: models.py:177 msgctxt "key for text search" msgid "permit-type" msgstr "" -#: models.py:171 +#: models.py:181 msgctxt "key for text search" msgid "permit-reference" msgstr "" -#: models.py:175 +#: models.py:185 msgctxt "key for text search" msgid "comment" msgstr "" -#: models.py:179 +#: models.py:189 msgctxt "key for text search" msgid "in-charge" msgstr "" -#: models.py:183 +#: models.py:193 msgctxt "key for text search" msgid "general-contractor" msgstr "" -#: models.py:188 +#: models.py:198 msgctxt "key for text search" msgid "general-contractor-organization" msgstr "" -#: models.py:192 +#: models.py:202 msgctxt "key for text search" msgid "created-by" msgstr "" -#: models.py:196 +#: models.py:206 msgctxt "key for text search" msgid "modified-by" msgstr "" -#: models.py:211 +#: models.py:224 msgid "Internal reference" msgstr "" -#: models.py:213 +#: models.py:226 msgid "External ID" msgstr "" -#: models.py:216 +#: models.py:229 msgid "External ID is set automatically" msgstr "" -#: models.py:228 +#: models.py:241 msgid "General contractor (raw)" msgstr "" -#: models.py:232 +#: models.py:245 msgid "General contractor organization" msgstr "" -#: models.py:240 +#: models.py:253 msgid "Planning service (raw)" msgstr "" -#: models.py:246 +#: models.py:259 msgid "Planning service organization" msgstr "" -#: models.py:252 templates/ishtar/sheet_file.html:55 +#: models.py:265 templates/ishtar/sheet_file.html:55 msgid "Closing date" msgstr "" -#: models.py:253 +#: models.py:266 msgid "Main town" msgstr "" -#: models.py:255 -msgid "Towns" -msgstr "" - -#: models.py:268 +#: models.py:281 msgid "Instruction deadline" msgstr "" -#: models.py:274 +#: models.py:287 msgid "Locality" msgstr "" -#: models.py:277 +#: models.py:290 msgid "Main address - postal code" msgstr "" -#: models.py:287 +#: models.py:300 msgid "Organization" msgstr "" -#: models.py:292 +#: models.py:305 msgid "Research archaeology comment" msgstr "" -#: models.py:306 +#: models.py:324 msgid "Cached name" msgstr "" -#: models.py:308 +#: models.py:326 msgid "Imported line" msgstr "" -#: models.py:343 +#: models.py:364 msgid "FILE" msgstr "" -#: models.py:525 +#: models.py:546 msgid "Multi-town" msgstr "" -#: models.py:531 +#: models.py:552 msgid "No town" msgstr "" -#: models.py:695 +#: models.py:716 msgid "File" msgstr "" -#: templates/ishtar/administrativeact_document.html:17 +#: templates/ishtar/administrativeact_document.html:18 msgid "Document generation" msgstr "" -#: templates/ishtar/administrativeact_document.html:35 +#: templates/ishtar/administrativeact_document.html:36 msgid "Generate" msgstr "" @@ -613,63 +613,63 @@ msgstr "" msgid "by" msgstr "" -#: templates/ishtar/sheet_file.html:67 +#: templates/ishtar/sheet_file.html:68 msgid "Localisation" msgstr "" -#: templates/ishtar/sheet_file.html:76 +#: templates/ishtar/sheet_file.html:77 msgid "Surface" msgstr "" -#: templates/ishtar/sheet_file.html:86 +#: templates/ishtar/sheet_file.html:87 msgid "Preventive archaeological file" msgstr "" -#: templates/ishtar/sheet_file.html:91 +#: templates/ishtar/sheet_file.html:92 msgid "Developed surface" msgstr "" -#: templates/ishtar/sheet_file.html:154 +#: templates/ishtar/sheet_file.html:155 msgid "Associated parcels" msgstr "" -#: templates/ishtar/sheet_file.html:157 +#: templates/ishtar/sheet_file.html:158 msgid "Administrative acts" msgstr "" -#: templates/ishtar/sheet_file.html:160 wizards.py:123 +#: templates/ishtar/sheet_file.html:161 wizards.py:127 msgid "Associated operations" msgstr "" -#: templates/ishtar/sheet_file.html:163 templates/ishtar/sheet_file.html:191 +#: templates/ishtar/sheet_file.html:164 templates/ishtar/sheet_file.html:192 msgid "Ref." msgstr "" -#: templates/ishtar/sheet_file.html:165 templates/ishtar/sheet_file.html:192 +#: templates/ishtar/sheet_file.html:166 templates/ishtar/sheet_file.html:193 msgid "Type" msgstr "" -#: templates/ishtar/sheet_file.html:167 +#: templates/ishtar/sheet_file.html:168 msgid "Start date" msgstr "" -#: templates/ishtar/sheet_file.html:168 +#: templates/ishtar/sheet_file.html:169 msgid "Excavation end date" msgstr "" -#: templates/ishtar/sheet_file.html:183 +#: templates/ishtar/sheet_file.html:184 msgid "No operation associated to this archaeological file" msgstr "" -#: templates/ishtar/sheet_file.html:187 +#: templates/ishtar/sheet_file.html:188 msgid "Admninistrative acts linked to associated operations" msgstr "" -#: templates/ishtar/sheet_file.html:193 +#: templates/ishtar/sheet_file.html:194 msgid "Date" msgstr "" -#: templates/ishtar/sheet_file.html:203 +#: templates/ishtar/sheet_file.html:204 msgid "No administrative act linked to operations" msgstr "" diff --git a/archaeological_files/migrations/0014_auto_20181017_1642.py b/archaeological_files/migrations/0014_auto_20181017_1642.py new file mode 100644 index 000000000..a5868c692 --- /dev/null +++ b/archaeological_files/migrations/0014_auto_20181017_1642.py @@ -0,0 +1,36 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11.10 on 2018-10-17 16:42 +from __future__ import unicode_literals + +from django.db import migrations, models +import virtualtime + +from ishtar_common.utils_migrations import reinit_last_modified + + +def migrate_codes(apps, schema_editor): + models = ['File'] + reinit_last_modified( + apps, 'archaeological_files', models + ) + + +class Migration(migrations.Migration): + + dependencies = [ + ('archaeological_files', '0013_file_documents'), + ] + + operations = [ + migrations.AddField( + model_name='file', + name='last_modified', + field=models.DateTimeField(default=virtualtime.virtual_datetime.now), + ), + migrations.AddField( + model_name='historicalfile', + name='last_modified', + field=models.DateTimeField(default=virtualtime.virtual_datetime.now), + ), + migrations.RunPython(migrate_codes) + ] diff --git a/archaeological_files/migrations/0015_auto_20181017_1854.py b/archaeological_files/migrations/0015_auto_20181017_1854.py new file mode 100644 index 000000000..5c7eee3b4 --- /dev/null +++ b/archaeological_files/migrations/0015_auto_20181017_1854.py @@ -0,0 +1,25 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11.10 on 2018-10-17 18:54 +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('archaeological_files', '0014_auto_20181017_1642'), + ] + + operations = [ + migrations.AlterField( + model_name='file', + name='last_modified', + field=models.DateTimeField(auto_now=True), + ), + migrations.AlterField( + model_name='historicalfile', + name='last_modified', + field=models.DateTimeField(blank=True, editable=False), + ), + ] diff --git a/archaeological_files/tests.py b/archaeological_files/tests.py index 9f3693225..312204a14 100644 --- a/archaeological_files/tests.py +++ b/archaeological_files/tests.py @@ -137,6 +137,8 @@ class FileTest(TestCase, FileInit): self.assertEqual(self.item.history.count(), nb_hist) new_values = self.item.values() for k in initial_values.keys(): + if k == 'last_modified': + continue self.assertTrue(k in new_values) self.assertEqual( new_values[k], initial_values[k], |
