udata 14.0.3.dev1__py3-none-any.whl → 14.7.3.dev4__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (151) hide show
  1. udata/api/__init__.py +2 -0
  2. udata/api_fields.py +120 -19
  3. udata/app.py +18 -20
  4. udata/auth/__init__.py +4 -7
  5. udata/auth/forms.py +3 -3
  6. udata/auth/views.py +13 -6
  7. udata/commands/dcat.py +1 -1
  8. udata/commands/serve.py +3 -11
  9. udata/core/activity/api.py +5 -6
  10. udata/core/badges/tests/test_tasks.py +0 -2
  11. udata/core/csv.py +5 -0
  12. udata/core/dataservices/api.py +8 -1
  13. udata/core/dataservices/apiv2.py +3 -6
  14. udata/core/dataservices/models.py +5 -2
  15. udata/core/dataservices/rdf.py +2 -1
  16. udata/core/dataservices/tasks.py +6 -2
  17. udata/core/dataset/api.py +30 -4
  18. udata/core/dataset/api_fields.py +1 -1
  19. udata/core/dataset/apiv2.py +1 -1
  20. udata/core/dataset/constants.py +2 -9
  21. udata/core/dataset/models.py +21 -9
  22. udata/core/dataset/permissions.py +31 -0
  23. udata/core/dataset/rdf.py +18 -16
  24. udata/core/dataset/tasks.py +16 -7
  25. udata/core/discussions/api.py +15 -1
  26. udata/core/discussions/models.py +6 -0
  27. udata/core/legal/__init__.py +0 -0
  28. udata/core/legal/mails.py +128 -0
  29. udata/core/organization/api.py +16 -5
  30. udata/core/organization/api_fields.py +3 -3
  31. udata/core/organization/apiv2.py +3 -4
  32. udata/core/organization/mails.py +1 -1
  33. udata/core/organization/models.py +40 -7
  34. udata/core/organization/notifications.py +84 -0
  35. udata/core/organization/permissions.py +1 -1
  36. udata/core/organization/tasks.py +3 -0
  37. udata/core/pages/models.py +49 -0
  38. udata/core/pages/tests/test_api.py +165 -1
  39. udata/core/post/api.py +25 -70
  40. udata/core/post/constants.py +8 -0
  41. udata/core/post/models.py +109 -17
  42. udata/core/post/tests/test_api.py +140 -3
  43. udata/core/post/tests/test_models.py +24 -0
  44. udata/core/reports/api.py +18 -0
  45. udata/core/reports/models.py +42 -2
  46. udata/core/reuse/api.py +8 -0
  47. udata/core/reuse/apiv2.py +3 -6
  48. udata/core/reuse/models.py +1 -1
  49. udata/core/spatial/forms.py +2 -2
  50. udata/core/topic/models.py +8 -2
  51. udata/core/user/api.py +10 -3
  52. udata/core/user/api_fields.py +3 -3
  53. udata/core/user/models.py +33 -8
  54. udata/features/notifications/api.py +7 -18
  55. udata/features/notifications/models.py +59 -0
  56. udata/features/notifications/tasks.py +25 -0
  57. udata/features/transfer/actions.py +2 -0
  58. udata/features/transfer/models.py +17 -0
  59. udata/features/transfer/notifications.py +96 -0
  60. udata/flask_mongoengine/engine.py +0 -4
  61. udata/flask_mongoengine/pagination.py +1 -1
  62. udata/frontend/markdown.py +2 -1
  63. udata/harvest/actions.py +20 -0
  64. udata/harvest/api.py +24 -7
  65. udata/harvest/backends/base.py +27 -1
  66. udata/harvest/backends/ckan/harvesters.py +21 -4
  67. udata/harvest/backends/dcat.py +4 -1
  68. udata/harvest/commands.py +33 -0
  69. udata/harvest/filters.py +17 -6
  70. udata/harvest/models.py +16 -0
  71. udata/harvest/permissions.py +27 -0
  72. udata/harvest/tests/ckan/test_ckan_backend.py +33 -0
  73. udata/harvest/tests/test_actions.py +46 -2
  74. udata/harvest/tests/test_api.py +161 -6
  75. udata/harvest/tests/test_base_backend.py +86 -1
  76. udata/harvest/tests/test_dcat_backend.py +68 -3
  77. udata/harvest/tests/test_filters.py +6 -0
  78. udata/i18n.py +1 -4
  79. udata/mail.py +14 -0
  80. udata/migrations/2021-08-17-harvest-integrity.py +23 -16
  81. udata/migrations/2025-10-31-create-membership-request-notifications.py +55 -0
  82. udata/migrations/2025-12-04-add-uuid-to-discussion-messages.py +28 -0
  83. udata/migrations/2025-12-16-create-transfer-request-notifications.py +69 -0
  84. udata/migrations/2026-01-14-add-default-kind-to-posts.py +17 -0
  85. udata/mongo/slug_fields.py +1 -1
  86. udata/rdf.py +65 -11
  87. udata/routing.py +2 -2
  88. udata/settings.py +11 -0
  89. udata/tasks.py +2 -0
  90. udata/templates/mail/message.html +3 -1
  91. udata/tests/api/__init__.py +7 -17
  92. udata/tests/api/test_activities_api.py +36 -0
  93. udata/tests/api/test_datasets_api.py +69 -0
  94. udata/tests/api/test_organizations_api.py +0 -3
  95. udata/tests/api/test_reports_api.py +157 -0
  96. udata/tests/api/test_user_api.py +1 -1
  97. udata/tests/apiv2/test_dataservices.py +14 -0
  98. udata/tests/apiv2/test_organizations.py +9 -0
  99. udata/tests/apiv2/test_reuses.py +11 -0
  100. udata/tests/cli/test_cli_base.py +0 -1
  101. udata/tests/dataservice/test_dataservice_tasks.py +29 -0
  102. udata/tests/dataset/test_dataset_model.py +13 -1
  103. udata/tests/dataset/test_dataset_rdf.py +164 -5
  104. udata/tests/dataset/test_dataset_tasks.py +25 -0
  105. udata/tests/frontend/test_auth.py +58 -1
  106. udata/tests/frontend/test_csv.py +0 -3
  107. udata/tests/helpers.py +31 -27
  108. udata/tests/organization/test_notifications.py +67 -2
  109. udata/tests/search/test_search_integration.py +70 -0
  110. udata/tests/site/test_site_csv_exports.py +22 -10
  111. udata/tests/test_activity.py +9 -9
  112. udata/tests/test_api_fields.py +10 -0
  113. udata/tests/test_discussions.py +5 -5
  114. udata/tests/test_legal_mails.py +359 -0
  115. udata/tests/test_notifications.py +15 -57
  116. udata/tests/test_notifications_task.py +43 -0
  117. udata/tests/test_owned.py +81 -1
  118. udata/tests/test_transfer.py +181 -2
  119. udata/tests/test_uris.py +33 -0
  120. udata/translations/ar/LC_MESSAGES/udata.mo +0 -0
  121. udata/translations/ar/LC_MESSAGES/udata.po +309 -158
  122. udata/translations/de/LC_MESSAGES/udata.mo +0 -0
  123. udata/translations/de/LC_MESSAGES/udata.po +313 -160
  124. udata/translations/es/LC_MESSAGES/udata.mo +0 -0
  125. udata/translations/es/LC_MESSAGES/udata.po +312 -160
  126. udata/translations/fr/LC_MESSAGES/udata.mo +0 -0
  127. udata/translations/fr/LC_MESSAGES/udata.po +475 -202
  128. udata/translations/it/LC_MESSAGES/udata.mo +0 -0
  129. udata/translations/it/LC_MESSAGES/udata.po +317 -162
  130. udata/translations/pt/LC_MESSAGES/udata.mo +0 -0
  131. udata/translations/pt/LC_MESSAGES/udata.po +315 -161
  132. udata/translations/sr/LC_MESSAGES/udata.mo +0 -0
  133. udata/translations/sr/LC_MESSAGES/udata.po +323 -164
  134. udata/translations/udata.pot +169 -124
  135. udata/uris.py +0 -2
  136. udata/utils.py +23 -0
  137. udata-14.7.3.dev4.dist-info/METADATA +109 -0
  138. {udata-14.0.3.dev1.dist-info → udata-14.7.3.dev4.dist-info}/RECORD +142 -135
  139. udata/core/post/forms.py +0 -30
  140. udata/flask_mongoengine/json.py +0 -38
  141. udata/templates/mail/base.html +0 -105
  142. udata/templates/mail/base.txt +0 -6
  143. udata/templates/mail/button.html +0 -3
  144. udata/templates/mail/layouts/1-column.html +0 -19
  145. udata/templates/mail/layouts/2-columns.html +0 -20
  146. udata/templates/mail/layouts/center-panel.html +0 -16
  147. udata-14.0.3.dev1.dist-info/METADATA +0 -132
  148. {udata-14.0.3.dev1.dist-info → udata-14.7.3.dev4.dist-info}/WHEEL +0 -0
  149. {udata-14.0.3.dev1.dist-info → udata-14.7.3.dev4.dist-info}/entry_points.txt +0 -0
  150. {udata-14.0.3.dev1.dist-info → udata-14.7.3.dev4.dist-info}/licenses/LICENSE +0 -0
  151. {udata-14.0.3.dev1.dist-info → udata-14.7.3.dev4.dist-info}/top_level.txt +0 -0
@@ -1,15 +1,15 @@
1
1
  # English translations for PROJECT.
2
- # Copyright (C) 2025 Open Data Team
2
+ # Copyright (C) 2026 Open Data Team
3
3
  # This file is distributed under the same license as the PROJECT project.
4
- # FIRST AUTHOR <EMAIL@ADDRESS>, 2025.
4
+ # FIRST AUTHOR <EMAIL@ADDRESS>, 2026.
5
5
  #
6
6
  #, fuzzy
7
7
  msgid ""
8
8
  msgstr ""
9
9
  "Project-Id-Version: PROJECT VERSION\n"
10
10
  "Report-Msgid-Bugs-To: i18n@opendata.team\n"
11
- "POT-Creation-Date: 2025-11-19 11:00+0100\n"
12
- "PO-Revision-Date: 2025-11-19 11:00+0100\n"
11
+ "POT-Creation-Date: 2026-01-13 10:28+0100\n"
12
+ "PO-Revision-Date: 2026-01-13 10:29+0100\n"
13
13
  "Last-Translator: Open Data Team <i18n@opendata.team>\n"
14
14
  "Language: en\n"
15
15
  "Language-Team: Open Data Team <i18n@opendata.team>\n"
@@ -19,31 +19,31 @@ msgstr ""
19
19
  "Content-Transfer-Encoding: 8bit\n"
20
20
  "Generated-By: Babel 2.17.0\n"
21
21
 
22
- #: udata/settings.py:127
22
+ #: udata/settings.py:129
23
23
  msgid "Welcome"
24
24
  msgstr ""
25
25
 
26
- #: udata/settings.py:128
26
+ #: udata/settings.py:130
27
27
  msgid "Please confirm your email"
28
28
  msgstr ""
29
29
 
30
- #: udata/settings.py:129
30
+ #: udata/settings.py:131
31
31
  msgid "Login instructions"
32
32
  msgstr ""
33
33
 
34
- #: udata/auth/mails.py:125 udata/settings.py:130
34
+ #: udata/auth/mails.py:125 udata/settings.py:132
35
35
  msgid "Your password has been reset"
36
36
  msgstr ""
37
37
 
38
- #: udata/auth/mails.py:137 udata/settings.py:131
38
+ #: udata/auth/mails.py:137 udata/settings.py:133
39
39
  msgid "Your password has been changed"
40
40
  msgstr ""
41
41
 
42
- #: udata/settings.py:132
42
+ #: udata/settings.py:134
43
43
  msgid "Password reset instructions"
44
44
  msgstr ""
45
45
 
46
- #: udata/settings.py:542
46
+ #: udata/settings.py:553
47
47
  msgid "This dataset has been archived"
48
48
  msgstr ""
49
49
 
@@ -52,41 +52,41 @@ msgstr ""
52
52
  msgid "Invalid URL \"{url}\": {reason}"
53
53
  msgstr ""
54
54
 
55
- #: udata/tests/api/test_datasets_api.py:1174 udata/tests/test_model.py:402
55
+ #: udata/tests/api/test_datasets_api.py:1187 udata/tests/test_model.py:402
56
56
  #: udata/uris.py:56
57
57
  #, python-brace-format
58
58
  msgid "Invalid URL \"{url}\""
59
59
  msgstr ""
60
60
 
61
- #: udata/uris.py:130
61
+ #: udata/uris.py:128
62
62
  #, python-brace-format
63
63
  msgid "Invalid scheme {0}, allowed schemes: {1}"
64
64
  msgstr ""
65
65
 
66
- #: udata/uris.py:133
66
+ #: udata/uris.py:131
67
67
  msgid "Credentials in URL are not allowed"
68
68
  msgstr ""
69
69
 
70
- #: udata/uris.py:137
70
+ #: udata/uris.py:135
71
71
  #, python-brace-format
72
72
  msgid "Invalid TLD {0}"
73
73
  msgstr ""
74
74
 
75
- #: udata/uris.py:146
75
+ #: udata/uris.py:144
76
76
  #, python-brace-format
77
77
  msgid "{0} is a multicast IP"
78
78
  msgstr ""
79
79
 
80
- #: udata/uris.py:148
80
+ #: udata/uris.py:146
81
81
  #, python-brace-format
82
82
  msgid "{0} is a mask IP"
83
83
  msgstr ""
84
84
 
85
- #: udata/uris.py:152
85
+ #: udata/uris.py:150
86
86
  msgid "is a local URL"
87
87
  msgstr ""
88
88
 
89
- #: udata/tests/test_model.py:420 udata/uris.py:159
89
+ #: udata/tests/test_model.py:420 udata/uris.py:157
90
90
  msgid "is a private URL"
91
91
  msgstr ""
92
92
 
@@ -147,7 +147,7 @@ msgid "J'accepte les conditions générales d'utilisation"
147
147
  msgstr ""
148
148
 
149
149
  #: udata/auth/forms.py:52
150
- msgid "Vous devez accepter les CGU pour continuer."
150
+ msgid "You must accept the terms of use to continue."
151
151
  msgstr ""
152
152
 
153
153
  #: udata/auth/forms.py:75 udata/tests/forms/test_current_user_field.py:192
@@ -390,8 +390,8 @@ msgid "An existing contact point already exists with these informations."
390
390
  msgstr ""
391
391
 
392
392
  #: udata/core/contact_point/forms.py:12 udata/core/jobs/forms.py:27
393
- #: udata/core/organization/forms.py:46 udata/core/post/forms.py:15
394
- #: udata/core/topic/forms.py:37 udata/harvest/forms.py:80
393
+ #: udata/core/organization/forms.py:46 udata/core/topic/forms.py:37
394
+ #: udata/harvest/forms.py:80
395
395
  msgid "Name"
396
396
  msgstr ""
397
397
 
@@ -478,7 +478,7 @@ msgstr ""
478
478
  msgid "deleted a dataservice"
479
479
  msgstr ""
480
480
 
481
- #: udata/core/dataservices/api.py:62
481
+ #: udata/core/dataservices/api.py:63
482
482
  msgid "Latest APIs"
483
483
  msgstr ""
484
484
 
@@ -490,12 +490,12 @@ msgstr ""
490
490
  msgid "dataservice"
491
491
  msgstr ""
492
492
 
493
- #: udata/core/dataservices/models.py:266 udata/core/dataset/models.py:580
493
+ #: udata/core/dataservices/models.py:269 udata/core/dataset/models.py:595
494
494
  #: udata/mongo/datetime_fields.py:60
495
495
  msgid "Creation date"
496
496
  msgstr ""
497
497
 
498
- #: udata/core/dataservices/models.py:272 udata/core/dataset/models.py:585
498
+ #: udata/core/dataservices/models.py:275 udata/core/dataset/models.py:600
499
499
  #: udata/mongo/datetime_fields.py:66
500
500
  msgid "Last modification date"
501
501
  msgstr ""
@@ -524,7 +524,16 @@ msgstr ""
524
524
  msgid "removed a resource from a dataset"
525
525
  msgstr ""
526
526
 
527
- #: udata/core/dataset/api.py:332
527
+ #: udata/core/dataset/api.py:344
528
+ #, python-brace-format
529
+ msgid "Datasets search: {q}"
530
+ msgstr ""
531
+
532
+ #: udata/core/dataset/api.py:346
533
+ msgid "Filtered datasets"
534
+ msgstr ""
535
+
536
+ #: udata/core/dataset/api.py:348
528
537
  msgid "Latest datasets"
529
538
  msgstr ""
530
539
 
@@ -680,7 +689,7 @@ msgstr ""
680
689
  msgid "Not planned"
681
690
  msgstr ""
682
691
 
683
- #: udata/core/dataset/constants.py:73 udata/core/dataset/constants.py:156
692
+ #: udata/core/dataset/constants.py:73 udata/core/dataset/constants.py:149
684
693
  #: udata/core/spatial/constants.py:5
685
694
  msgid "Other"
686
695
  msgstr ""
@@ -693,31 +702,31 @@ msgstr ""
693
702
  msgid "Unknown"
694
703
  msgstr ""
695
704
 
696
- #: udata/core/dataset/constants.py:151
705
+ #: udata/core/dataset/constants.py:144
697
706
  msgid "Main file"
698
707
  msgstr ""
699
708
 
700
- #: udata/core/dataset/constants.py:152
709
+ #: udata/core/dataset/constants.py:145
701
710
  msgid "Documentation"
702
711
  msgstr ""
703
712
 
704
- #: udata/core/dataset/constants.py:153
713
+ #: udata/core/dataset/constants.py:146
705
714
  msgid "Update"
706
715
  msgstr ""
707
716
 
708
- #: udata/core/dataset/constants.py:154 udata/core/reuse/constants.py:4
717
+ #: udata/core/dataset/constants.py:147 udata/core/reuse/constants.py:4
709
718
  msgid "API"
710
719
  msgstr ""
711
720
 
712
- #: udata/core/dataset/constants.py:155
721
+ #: udata/core/dataset/constants.py:148
713
722
  msgid "Code repository"
714
723
  msgstr ""
715
724
 
716
- #: udata/core/dataset/constants.py:163
725
+ #: udata/core/dataset/constants.py:156
717
726
  msgid "Uploaded file"
718
727
  msgstr ""
719
728
 
720
- #: udata/core/dataset/constants.py:164
729
+ #: udata/core/dataset/constants.py:157
721
730
  msgid "Remote file"
722
731
  msgstr ""
723
732
 
@@ -794,7 +803,7 @@ msgstr ""
794
803
  msgid "Related dataset"
795
804
  msgstr ""
796
805
 
797
- #: udata/core/dataset/forms.py:147 udata/tests/api/test_datasets_api.py:1086
806
+ #: udata/core/dataset/forms.py:147 udata/tests/api/test_datasets_api.py:1099
798
807
  msgid "Wrong contact point id or contact point ownership mismatch"
799
808
  msgstr ""
800
809
 
@@ -863,9 +872,8 @@ msgstr ""
863
872
  msgid "The geographical area covered by the data."
864
873
  msgstr ""
865
874
 
866
- #: udata/core/dataset/forms.py:211 udata/core/post/forms.py:26
867
- #: udata/core/site/forms.py:13 udata/core/topic/forms.py:15
868
- #: udata/core/topic/forms.py:89
875
+ #: udata/core/dataset/forms.py:211 udata/core/site/forms.py:13
876
+ #: udata/core/topic/forms.py:15 udata/core/topic/forms.py:89
869
877
  msgid "Tags"
870
878
  msgstr ""
871
879
 
@@ -881,67 +889,67 @@ msgstr ""
881
889
  msgid "Restrict the dataset visibility to you or your organization only."
882
890
  msgstr ""
883
891
 
884
- #: udata/core/dataset/models.py:69
892
+ #: udata/core/dataset/models.py:71
885
893
  msgid "Pivotal data"
886
894
  msgstr ""
887
895
 
888
- #: udata/core/dataset/models.py:70
896
+ #: udata/core/dataset/models.py:72
889
897
  msgid "Reference data public service"
890
898
  msgstr ""
891
899
 
892
- #: udata/core/dataset/models.py:71
900
+ #: udata/core/dataset/models.py:73
893
901
  msgid "Inspire"
894
902
  msgstr ""
895
903
 
896
- #: udata/core/dataset/models.py:72
904
+ #: udata/core/dataset/models.py:74
897
905
  msgid "High value datasets"
898
906
  msgstr ""
899
907
 
900
- #: udata/core/dataset/models.py:73
908
+ #: udata/core/dataset/models.py:75
901
909
  msgid "Certified statistic series"
902
910
  msgstr ""
903
911
 
904
- #: udata/core/dataset/models.py:74
912
+ #: udata/core/dataset/models.py:76
905
913
  msgid "Statistical series of general interest"
906
914
  msgstr ""
907
915
 
908
- #: udata/core/dataset/models.py:154
916
+ #: udata/core/dataset/models.py:158
909
917
  msgid "A schema must contains a name or an URL when a version is provided."
910
918
  msgstr ""
911
919
 
912
- #: udata/core/dataset/models.py:186 udata/tests/api/test_datasets_api.py:1182
913
- #: udata/tests/api/test_datasets_api.py:1193
920
+ #: udata/core/dataset/models.py:190 udata/tests/api/test_datasets_api.py:1195
921
+ #: udata/tests/api/test_datasets_api.py:1206
914
922
  #, python-brace-format
915
923
  msgid "Schema name \"{schema}\" is not an allowed value. Allowed values: {values}"
916
924
  msgstr ""
917
925
 
918
- #: udata/core/dataset/models.py:205 udata/tests/api/test_datasets_api.py:1205
926
+ #: udata/core/dataset/models.py:209 udata/tests/api/test_datasets_api.py:1218
919
927
  #, python-brace-format
920
928
  msgid ""
921
929
  "Version \"{version}\" is not an allowed value for the schema \"{name}\". "
922
930
  "Allowed versions: {values}"
923
931
  msgstr ""
924
932
 
925
- #: udata/core/dataset/models.py:454 udata/core/dataset/rdf.py:596
926
- #: udata/tests/dataset/test_dataset_rdf.py:912
927
- #: udata/tests/dataset/test_dataset_rdf.py:925
933
+ #: udata/core/dataset/models.py:458 udata/core/dataset/rdf.py:596
934
+ #: udata/tests/dataset/test_dataset_rdf.py:1007
935
+ #: udata/tests/dataset/test_dataset_rdf.py:1020
928
936
  msgid "Nameless resource"
929
937
  msgstr ""
930
938
 
931
- #: udata/core/dataset/models.py:559
939
+ #: udata/core/dataset/models.py:568
932
940
  msgid "Future date of update"
933
941
  msgstr ""
934
942
 
935
- #: udata/core/dataset/models.py:591
943
+ #: udata/core/dataset/models.py:606
936
944
  msgid "Last update of the dataset resources"
937
945
  msgstr ""
938
946
 
939
- #: udata/core/dataset/models.py:646
947
+ #: udata/core/dataset/models.py:661
940
948
  msgid "dataset"
941
949
  msgstr ""
942
950
 
943
- #: udata/core/dataset/rdf.py:594 udata/tests/dataset/test_dataset_rdf.py:882
944
- #: udata/tests/dataset/test_dataset_rdf.py:899
951
+ #: udata/core/dataset/rdf.py:594 udata/tests/dataset/test_dataset_rdf.py:977
952
+ #: udata/tests/dataset/test_dataset_rdf.py:994
945
953
  #, python-brace-format
946
954
  msgid "{format} resource"
947
955
  msgstr ""
@@ -1004,6 +1012,14 @@ msgstr ""
1004
1012
  msgid "View the discussion"
1005
1013
  msgstr ""
1006
1014
 
1015
+ #: udata/core/discussions/models.py:18
1016
+ msgid "message"
1017
+ msgstr ""
1018
+
1019
+ #: udata/core/discussions/models.py:76
1020
+ msgid "discussion"
1021
+ msgstr ""
1022
+
1007
1023
  #: udata/core/jobs/forms.py:29
1008
1024
  msgid "Tasks"
1009
1025
  msgstr ""
@@ -1022,6 +1038,64 @@ msgstr ""
1022
1038
  msgid "every {0.every} {0.period}"
1023
1039
  msgstr ""
1024
1040
 
1041
+ #: udata/core/legal/mails.py:81
1042
+ #, python-format
1043
+ msgid ""
1044
+ "Our %(terms_link)s specify in point %(article)s that the platform is not "
1045
+ "\"intended to disseminate advertising content, promotions of private "
1046
+ "interests, content contrary to public order, illegal content, spam and any "
1047
+ "contribution violating the applicable legal framework. The Editor reserves "
1048
+ "the right, without prior notice, to remove or make inaccessible content "
1049
+ "published on the Platform that has no connection with its Purpose. The Editor"
1050
+ " does not carry out \"a priori\" control over publications. As soon as the "
1051
+ "Editor becomes aware of content contrary to these terms of use, it acts "
1052
+ "quickly to remove or make it inaccessible\"."
1053
+ msgstr ""
1054
+
1055
+ #: udata/core/legal/mails.py:95
1056
+ msgid ""
1057
+ "The platform is not \"intended to disseminate advertising content, promotions"
1058
+ " of private interests, content contrary to public order, illegal content, "
1059
+ "spam and any contribution violating the applicable legal framework. The "
1060
+ "Editor reserves the right, without prior notice, to remove or make "
1061
+ "inaccessible content published on the Platform that has no connection with "
1062
+ "its Purpose. The Editor does not carry out \"a priori\" control over "
1063
+ "publications. As soon as the Editor becomes aware of content contrary to "
1064
+ "these terms of use, it acts quickly to remove or make it inaccessible\"."
1065
+ msgstr ""
1066
+
1067
+ #: udata/core/legal/mails.py:107
1068
+ #, python-format
1069
+ msgid ""
1070
+ "You may contest this decision within two months of its notification by filing"
1071
+ " an administrative appeal (recours gracieux ou hiérarchique). You may also "
1072
+ "bring the matter before the administrative court via the "
1073
+ "\"%(telerecours_link)s\" application."
1074
+ msgstr ""
1075
+
1076
+ #: udata/core/legal/mails.py:114
1077
+ msgid "You may contest this decision by contacting us."
1078
+ msgstr ""
1079
+
1080
+ #: udata/core/legal/mails.py:117
1081
+ #, python-format
1082
+ msgid "Your %(content_type)s has been deleted."
1083
+ msgstr ""
1084
+
1085
+ #: udata/core/legal/mails.py:120
1086
+ msgid "Best regards,"
1087
+ msgstr ""
1088
+
1089
+ #: udata/core/legal/mails.py:122
1090
+ #, python-format
1091
+ msgid "%(site)s team member"
1092
+ msgstr ""
1093
+
1094
+ #: udata/core/legal/mails.py:126
1095
+ #, python-format
1096
+ msgid "Deletion of your %(content_type)s"
1097
+ msgstr ""
1098
+
1025
1099
  #: udata/core/organization/activities.py:18
1026
1100
  msgid "created an organization"
1027
1101
  msgstr ""
@@ -1038,18 +1112,18 @@ msgstr ""
1038
1112
  msgid "Editor"
1039
1113
  msgstr ""
1040
1114
 
1041
- #: udata/core/organization/constants.py:11 udata/features/transfer/models.py:13
1042
- #: udata/harvest/models.py:28 udata/harvest/models.py:40 udata/harvest/models.py:88
1115
+ #: udata/core/organization/constants.py:11 udata/features/transfer/models.py:16
1116
+ #: udata/harvest/models.py:28 udata/harvest/models.py:40 udata/harvest/models.py:89
1043
1117
  msgid "Pending"
1044
1118
  msgstr ""
1045
1119
 
1046
- #: udata/core/organization/constants.py:12 udata/features/transfer/models.py:14
1047
- #: udata/harvest/models.py:89
1120
+ #: udata/core/organization/constants.py:12 udata/features/transfer/models.py:17
1121
+ #: udata/harvest/models.py:90
1048
1122
  msgid "Accepted"
1049
1123
  msgstr ""
1050
1124
 
1051
- #: udata/core/organization/constants.py:13 udata/features/transfer/models.py:15
1052
- #: udata/harvest/models.py:90
1125
+ #: udata/core/organization/constants.py:13 udata/features/transfer/models.py:18
1126
+ #: udata/harvest/models.py:91
1053
1127
  msgid "Refused"
1054
1128
  msgstr ""
1055
1129
 
@@ -1202,27 +1276,31 @@ msgid ""
1202
1276
  "A badge is now associated with your organization."
1203
1277
  msgstr ""
1204
1278
 
1205
- #: udata/core/organization/models.py:39
1279
+ #: udata/core/organization/models.py:40
1206
1280
  msgid "Public Service"
1207
1281
  msgstr ""
1208
1282
 
1209
- #: udata/core/organization/models.py:40
1283
+ #: udata/core/organization/models.py:41
1210
1284
  msgid "Certified"
1211
1285
  msgstr ""
1212
1286
 
1213
- #: udata/core/organization/models.py:41
1287
+ #: udata/core/organization/models.py:42
1214
1288
  msgid "Association"
1215
1289
  msgstr ""
1216
1290
 
1217
- #: udata/core/organization/models.py:42
1291
+ #: udata/core/organization/models.py:43
1218
1292
  msgid "Company"
1219
1293
  msgstr ""
1220
1294
 
1221
- #: udata/core/organization/models.py:43
1295
+ #: udata/core/organization/models.py:44
1222
1296
  msgid "Local authority"
1223
1297
  msgstr ""
1224
1298
 
1225
- #: udata/core/post/api.py:118
1299
+ #: udata/core/organization/models.py:183
1300
+ msgid "organization"
1301
+ msgstr ""
1302
+
1303
+ #: udata/core/post/api.py:73
1226
1304
  msgid "Latests posts"
1227
1305
  msgstr ""
1228
1306
 
@@ -1234,43 +1312,19 @@ msgstr ""
1234
1312
  msgid "HTML"
1235
1313
  msgstr ""
1236
1314
 
1237
- #: udata/core/post/forms.py:16
1238
- msgid "Headline"
1239
- msgstr ""
1240
-
1241
- #: udata/core/post/forms.py:17
1242
- msgid "Content"
1243
- msgstr ""
1244
-
1245
- #: udata/core/post/forms.py:19
1246
- msgid "Associated datasets"
1247
- msgstr ""
1248
-
1249
- #: udata/core/post/forms.py:20
1250
- msgid "Associated reuses"
1251
- msgstr ""
1252
-
1253
- #: udata/core/post/forms.py:22
1254
- msgid "Image"
1255
- msgstr ""
1256
-
1257
- #: udata/core/post/forms.py:23
1258
- msgid "Image credits"
1315
+ #: udata/core/post/constants.py:11
1316
+ msgid "Blocs"
1259
1317
  msgstr ""
1260
1318
 
1261
- #: udata/core/post/forms.py:24
1262
- msgid "Credit URL"
1319
+ #: udata/core/post/constants.py:17
1320
+ msgid "News"
1263
1321
  msgstr ""
1264
1322
 
1265
- #: udata/core/post/forms.py:29
1266
- msgid "body type"
1323
+ #: udata/core/post/constants.py:18
1324
+ msgid "Page"
1267
1325
  msgstr ""
1268
1326
 
1269
- #: udata/core/post/forms.py:29
1270
- msgid "Specify your body type (HTML or markdown)"
1271
- msgstr ""
1272
-
1273
- #: udata/core/post/models.py:55
1327
+ #: udata/core/post/models.py:129
1274
1328
  msgid "post"
1275
1329
  msgstr ""
1276
1330
 
@@ -1310,7 +1364,7 @@ msgstr ""
1310
1364
  msgid "deleted a reuse"
1311
1365
  msgstr ""
1312
1366
 
1313
- #: udata/core/reuse/api.py:141
1367
+ #: udata/core/reuse/api.py:142
1314
1368
  msgid "Latests reuses"
1315
1369
  msgstr ""
1316
1370
 
@@ -1647,6 +1701,10 @@ msgid ""
1647
1701
  "always re-create an account on the %(site)s platform if necessary."
1648
1702
  msgstr ""
1649
1703
 
1704
+ #: udata/core/user/models.py:130
1705
+ msgid "account"
1706
+ msgstr ""
1707
+
1650
1708
  #: udata/core/user/permissions.py:5
1651
1709
  msgid "System administrator"
1652
1710
  msgstr ""
@@ -1733,7 +1791,7 @@ msgstr ""
1733
1791
  msgid "This field requires \"%(name)s\" to be set"
1734
1792
  msgstr ""
1735
1793
 
1736
- #: udata/frontend/markdown.py:27
1794
+ #: udata/frontend/markdown.py:28
1737
1795
  msgid "Source"
1738
1796
  msgstr ""
1739
1797
 
@@ -1785,27 +1843,27 @@ msgstr ""
1785
1843
  msgid "Archived"
1786
1844
  msgstr ""
1787
1845
 
1788
- #: udata/harvest/backends/dcat.py:434
1846
+ #: udata/harvest/backends/dcat.py:437
1789
1847
  msgid "Remote URL prefix"
1790
1848
  msgstr ""
1791
1849
 
1792
- #: udata/harvest/backends/dcat.py:437
1850
+ #: udata/harvest/backends/dcat.py:440
1793
1851
  msgid "A prefix used to build the remote URL of the harvested items."
1794
1852
  msgstr ""
1795
1853
 
1796
- #: udata/harvest/backends/ckan/harvesters.py:31
1854
+ #: udata/harvest/backends/ckan/harvesters.py:33
1797
1855
  msgid "Organization"
1798
1856
  msgstr ""
1799
1857
 
1800
- #: udata/harvest/backends/ckan/harvesters.py:31
1858
+ #: udata/harvest/backends/ckan/harvesters.py:33
1801
1859
  msgid "A CKAN Organization name"
1802
1860
  msgstr ""
1803
1861
 
1804
- #: udata/harvest/backends/ckan/harvesters.py:32
1862
+ #: udata/harvest/backends/ckan/harvesters.py:34
1805
1863
  msgid "Tag"
1806
1864
  msgstr ""
1807
1865
 
1808
- #: udata/harvest/backends/ckan/harvesters.py:32
1866
+ #: udata/harvest/backends/ckan/harvesters.py:34
1809
1867
  msgid "A CKAN tag name"
1810
1868
  msgstr ""
1811
1869
 
@@ -1834,33 +1892,20 @@ msgid ""
1834
1892
  "If you think this is a mistake, you can contact the site administrator."
1835
1893
  msgstr ""
1836
1894
 
1837
- #: udata/templates/mail/base.html:45
1838
- msgid "on your browser."
1839
- msgstr ""
1840
-
1841
- #: udata/templates/mail/base.html:48
1842
- #, python-format
1843
- msgid "View this email %(link)s"
1844
- msgstr ""
1845
-
1846
- #: udata/templates/mail/base.html:76 udata/templates/mail/message.html:41
1895
+ #: udata/templates/mail/message.html:15
1847
1896
  #, python-format
1848
1897
  msgid "Hi %(user)s"
1849
1898
  msgstr ""
1850
1899
 
1851
- #: udata/templates/mail/base.html:87
1852
- msgid "See you soon on the platform"
1900
+ #: udata/templates/mail/message.html:36
1901
+ msgid "Have a great day"
1853
1902
  msgstr ""
1854
1903
 
1855
- #: udata/templates/mail/base.html:88 udata/templates/mail/message.html:63
1904
+ #: udata/templates/mail/message.html:37
1856
1905
  #, python-format
1857
1906
  msgid "The %(site)s team"
1858
1907
  msgstr ""
1859
1908
 
1860
- #: udata/templates/mail/message.html:62
1861
- msgid "Have a great day"
1862
- msgstr ""
1863
-
1864
1909
  #: udata/templates/security/change_password.html:9
1865
1910
  #: udata/templates/security/change_password.html:16
1866
1911
  msgid "Change Password"
udata/uris.py CHANGED
@@ -91,8 +91,6 @@ def cdata_url(uri: str, **kwargs) -> str | None:
91
91
  uri += f"/{append.lstrip('/')}"
92
92
 
93
93
  url = urljoin(base_url, uri)
94
- if not url.endswith("/"):
95
- url += "/"
96
94
 
97
95
  url_parts = list(urlparse(url))
98
96
  url_parts[4] = urlencode(
udata/utils.py CHANGED
@@ -1,5 +1,6 @@
1
1
  import hashlib
2
2
  import itertools
3
+ import logging
3
4
  import math
4
5
  import re
5
6
  from collections import Counter
@@ -13,6 +14,7 @@ from xml.sax.saxutils import escape
13
14
  import factory
14
15
  from bson import ObjectId
15
16
  from bson.errors import InvalidId
17
+ from dateutil.parser import ParserError
16
18
  from dateutil.parser import parse as parse_dt
17
19
  from dateutil.relativedelta import relativedelta
18
20
  from faker import Faker
@@ -216,6 +218,27 @@ def to_naive_datetime(given_date: Any) -> datetime:
216
218
  return given_date
217
219
 
218
220
 
221
+ log = logging.getLogger(__name__)
222
+
223
+
224
+ def safe_harvest_datetime(value: Any, field: str, refuse_future: bool = False) -> datetime | None:
225
+ """
226
+ Safely parse a date/datetime value from harvested data.
227
+ Returns None and logs a warning if the value cannot be parsed or is in the future.
228
+ """
229
+ if value is None:
230
+ return None
231
+ try:
232
+ parsed = to_naive_datetime(value)
233
+ except ParserError:
234
+ log.warning(f"Unparseable {field} value: '{value}'")
235
+ return None
236
+ if refuse_future and parsed and parsed > datetime.utcnow():
237
+ log.warning(f"Future {field} value: '{value}'")
238
+ return None
239
+ return parsed
240
+
241
+
219
242
  def to_iso(dt: date | datetime) -> str | None:
220
243
  """
221
244
  Format a date or datetime into an ISO-8601 string