udata 12.0.2.dev15__py3-none-any.whl → 13.0.1.dev21__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.

Potentially problematic release.


This version of udata might be problematic. Click here for more details.

Files changed (258) hide show
  1. udata/api/__init__.py +1 -0
  2. udata/api_fields.py +10 -4
  3. udata/app.py +11 -10
  4. udata/auth/__init__.py +9 -10
  5. udata/auth/mails.py +137 -45
  6. udata/auth/views.py +5 -12
  7. udata/commands/__init__.py +2 -3
  8. udata/commands/info.py +1 -3
  9. udata/commands/tests/test_fixtures.py +6 -3
  10. udata/core/access_type/api.py +18 -0
  11. udata/core/access_type/constants.py +98 -0
  12. udata/core/access_type/models.py +44 -0
  13. udata/core/activity/models.py +1 -1
  14. udata/core/badges/models.py +1 -1
  15. udata/core/badges/tasks.py +35 -1
  16. udata/core/badges/tests/test_commands.py +2 -4
  17. udata/core/badges/tests/test_model.py +2 -2
  18. udata/core/badges/tests/test_tasks.py +55 -0
  19. udata/core/constants.py +1 -0
  20. udata/core/contact_point/models.py +8 -0
  21. udata/core/dataservices/api.py +3 -3
  22. udata/core/dataservices/apiv2.py +3 -1
  23. udata/core/dataservices/constants.py +0 -29
  24. udata/core/dataservices/models.py +44 -44
  25. udata/core/dataservices/rdf.py +2 -1
  26. udata/core/dataservices/search.py +5 -9
  27. udata/core/dataservices/tasks.py +33 -0
  28. udata/core/dataset/api_fields.py +11 -0
  29. udata/core/dataset/apiv2.py +11 -0
  30. udata/core/dataset/constants.py +0 -1
  31. udata/core/dataset/forms.py +29 -0
  32. udata/core/dataset/models.py +16 -4
  33. udata/core/dataset/rdf.py +2 -1
  34. udata/core/dataset/search.py +2 -2
  35. udata/core/dataset/tasks.py +86 -8
  36. udata/core/discussions/mails.py +63 -0
  37. udata/core/discussions/tasks.py +4 -18
  38. udata/core/metrics/__init__.py +0 -6
  39. udata/core/organization/api.py +3 -1
  40. udata/core/organization/mails.py +144 -0
  41. udata/core/organization/models.py +2 -1
  42. udata/core/organization/search.py +1 -1
  43. udata/core/organization/tasks.py +21 -49
  44. udata/core/pages/tests/test_api.py +0 -2
  45. udata/core/reuse/api.py +27 -1
  46. udata/core/reuse/mails.py +21 -0
  47. udata/core/reuse/models.py +10 -1
  48. udata/core/reuse/search.py +1 -1
  49. udata/core/reuse/tasks.py +2 -3
  50. udata/core/site/models.py +2 -6
  51. udata/core/spatial/tests/test_api.py +17 -20
  52. udata/core/spatial/tests/test_models.py +3 -3
  53. udata/core/user/mails.py +54 -0
  54. udata/core/user/models.py +2 -3
  55. udata/core/user/tasks.py +8 -23
  56. udata/core/user/tests/test_user_model.py +2 -6
  57. udata/entrypoints.py +0 -5
  58. udata/features/identicon/tests/test_backends.py +3 -13
  59. udata/forms/fields.py +3 -3
  60. udata/forms/widgets.py +2 -2
  61. udata/frontend/__init__.py +3 -32
  62. udata/harvest/actions.py +4 -9
  63. udata/harvest/api.py +5 -14
  64. udata/harvest/backends/__init__.py +20 -11
  65. udata/harvest/backends/base.py +2 -2
  66. udata/harvest/backends/ckan/harvesters.py +2 -1
  67. udata/harvest/backends/dcat.py +3 -0
  68. udata/harvest/backends/maaf.py +1 -0
  69. udata/harvest/commands.py +6 -4
  70. udata/harvest/forms.py +9 -6
  71. udata/harvest/tasks.py +3 -5
  72. udata/harvest/tests/ckan/test_ckan_backend.py +300 -337
  73. udata/harvest/tests/ckan/test_ckan_backend_errors.py +94 -99
  74. udata/harvest/tests/ckan/test_ckan_backend_filters.py +128 -122
  75. udata/harvest/tests/ckan/test_dkan_backend.py +39 -51
  76. udata/harvest/tests/dcat/datara--5a26b0f6-0ccf-46ad-ac58-734054b91977.rdf.xml +255 -0
  77. udata/harvest/tests/dcat/datara--f40c3860-7236-4b30-a141-23b8ae33f7b2.rdf.xml +289 -0
  78. udata/harvest/tests/factories.py +1 -1
  79. udata/harvest/tests/test_actions.py +11 -9
  80. udata/harvest/tests/test_api.py +4 -5
  81. udata/harvest/tests/test_base_backend.py +5 -4
  82. udata/harvest/tests/test_dcat_backend.py +50 -19
  83. udata/harvest/tests/test_models.py +2 -4
  84. udata/harvest/tests/test_notifications.py +2 -4
  85. udata/harvest/tests/test_tasks.py +2 -3
  86. udata/mail.py +90 -53
  87. udata/migrations/2025-01-05-dataservices-fields-changes.py +8 -14
  88. udata/migrations/2025-10-21-remove-ckan-harvest-modified-at.py +28 -0
  89. udata/migrations/2025-10-29-harvesters-sources-integrity.py +27 -0
  90. udata/mongo/taglist_field.py +3 -3
  91. udata/rdf.py +32 -15
  92. udata/sentry.py +3 -4
  93. udata/settings.py +7 -2
  94. udata/tags.py +5 -5
  95. udata/tasks.py +3 -3
  96. udata/templates/mail/message.html +65 -0
  97. udata/templates/mail/message.txt +16 -0
  98. udata/tests/__init__.py +40 -58
  99. udata/tests/api/__init__.py +87 -2
  100. udata/tests/api/test_activities_api.py +17 -23
  101. udata/tests/api/test_auth_api.py +2 -4
  102. udata/tests/api/test_contact_points.py +48 -54
  103. udata/tests/api/test_dataservices_api.py +57 -37
  104. udata/tests/api/test_datasets_api.py +146 -49
  105. udata/tests/api/test_me_api.py +4 -6
  106. udata/tests/api/test_organizations_api.py +19 -38
  107. udata/tests/api/test_reports_api.py +0 -4
  108. udata/tests/api/test_reuses_api.py +92 -19
  109. udata/tests/api/test_security_api.py +124 -0
  110. udata/tests/api/test_swagger.py +2 -3
  111. udata/tests/api/test_tags_api.py +6 -7
  112. udata/tests/api/test_transfer_api.py +0 -2
  113. udata/tests/api/test_user_api.py +8 -10
  114. udata/tests/apiv2/test_datasets.py +0 -4
  115. udata/tests/apiv2/test_me_api.py +0 -2
  116. udata/tests/apiv2/test_organizations.py +0 -2
  117. udata/tests/apiv2/test_swagger.py +2 -3
  118. udata/tests/apiv2/test_topics.py +0 -2
  119. udata/tests/cli/test_cli_base.py +14 -12
  120. udata/tests/cli/test_db_cli.py +51 -54
  121. udata/tests/contact_point/test_contact_point_models.py +2 -2
  122. udata/tests/dataservice/test_csv_adapter.py +2 -5
  123. udata/tests/dataservice/test_dataservice_rdf.py +8 -6
  124. udata/tests/dataservice/test_dataservice_tasks.py +36 -38
  125. udata/tests/dataset/test_csv_adapter.py +2 -5
  126. udata/tests/dataset/test_dataset_actions.py +2 -4
  127. udata/tests/dataset/test_dataset_commands.py +2 -4
  128. udata/tests/dataset/test_dataset_events.py +3 -3
  129. udata/tests/dataset/test_dataset_model.py +6 -7
  130. udata/tests/dataset/test_dataset_rdf.py +201 -12
  131. udata/tests/dataset/test_dataset_recommendations.py +2 -2
  132. udata/tests/dataset/test_dataset_tasks.py +66 -68
  133. udata/tests/dataset/test_resource_preview.py +39 -48
  134. udata/tests/dataset/test_transport_tasks.py +2 -2
  135. udata/tests/features/territories/__init__.py +0 -6
  136. udata/tests/features/territories/test_territories_api.py +25 -24
  137. udata/tests/forms/test_current_user_field.py +2 -2
  138. udata/tests/forms/test_dict_field.py +2 -4
  139. udata/tests/forms/test_extras_fields.py +2 -3
  140. udata/tests/forms/test_image_field.py +2 -2
  141. udata/tests/forms/test_model_field.py +2 -4
  142. udata/tests/forms/test_publish_as_field.py +2 -4
  143. udata/tests/forms/test_user_forms.py +26 -29
  144. udata/tests/frontend/test_auth.py +2 -3
  145. udata/tests/frontend/test_csv.py +5 -6
  146. udata/tests/frontend/test_error_handlers.py +2 -3
  147. udata/tests/frontend/test_hooks.py +5 -7
  148. udata/tests/frontend/test_markdown.py +3 -4
  149. udata/tests/helpers.py +2 -7
  150. udata/tests/metrics/test_metrics.py +52 -48
  151. udata/tests/metrics/test_tasks.py +154 -150
  152. udata/tests/organization/test_csv_adapter.py +2 -5
  153. udata/tests/organization/test_notifications.py +2 -4
  154. udata/tests/organization/test_organization_model.py +3 -4
  155. udata/tests/organization/test_organization_rdf.py +2 -8
  156. udata/tests/plugin.py +6 -110
  157. udata/tests/reuse/test_reuse_model.py +3 -4
  158. udata/tests/site/test_site_api.py +0 -2
  159. udata/tests/site/test_site_csv_exports.py +0 -2
  160. udata/tests/site/test_site_metrics.py +2 -4
  161. udata/tests/site/test_site_model.py +2 -2
  162. udata/tests/site/test_site_rdf.py +4 -7
  163. udata/tests/test_activity.py +3 -3
  164. udata/tests/test_api_fields.py +6 -9
  165. udata/tests/test_cors.py +0 -2
  166. udata/tests/test_dcat_commands.py +2 -3
  167. udata/tests/test_discussions.py +2 -7
  168. udata/tests/test_mail.py +150 -114
  169. udata/tests/test_migrations.py +413 -419
  170. udata/tests/test_model.py +10 -11
  171. udata/tests/test_notifications.py +2 -3
  172. udata/tests/test_owned.py +3 -3
  173. udata/tests/test_rdf.py +19 -15
  174. udata/tests/test_routing.py +5 -5
  175. udata/tests/test_storages.py +6 -5
  176. udata/tests/test_tags.py +2 -4
  177. udata/tests/test_topics.py +2 -4
  178. udata/tests/test_transfer.py +4 -5
  179. udata/tests/topic/test_topic_tasks.py +25 -27
  180. udata/tests/user/test_user_rdf.py +2 -8
  181. udata/tests/user/test_user_tasks.py +3 -5
  182. udata/tests/workers/test_jobs_commands.py +2 -2
  183. udata/tests/workers/test_tasks_routing.py +27 -27
  184. udata/translations/ar/LC_MESSAGES/udata.mo +0 -0
  185. udata/translations/ar/LC_MESSAGES/udata.po +369 -435
  186. udata/translations/de/LC_MESSAGES/udata.mo +0 -0
  187. udata/translations/de/LC_MESSAGES/udata.po +371 -437
  188. udata/translations/es/LC_MESSAGES/udata.mo +0 -0
  189. udata/translations/es/LC_MESSAGES/udata.po +369 -435
  190. udata/translations/fr/LC_MESSAGES/udata.mo +0 -0
  191. udata/translations/fr/LC_MESSAGES/udata.po +381 -447
  192. udata/translations/it/LC_MESSAGES/udata.mo +0 -0
  193. udata/translations/it/LC_MESSAGES/udata.po +371 -437
  194. udata/translations/pt/LC_MESSAGES/udata.mo +0 -0
  195. udata/translations/pt/LC_MESSAGES/udata.po +371 -437
  196. udata/translations/sr/LC_MESSAGES/udata.mo +0 -0
  197. udata/translations/sr/LC_MESSAGES/udata.po +372 -438
  198. udata/translations/udata.pot +379 -440
  199. udata/utils.py +14 -2
  200. {udata-12.0.2.dev15.dist-info → udata-13.0.1.dev21.dist-info}/METADATA +1 -2
  201. {udata-12.0.2.dev15.dist-info → udata-13.0.1.dev21.dist-info}/RECORD +205 -242
  202. udata/templates/mail/account_deleted.html +0 -5
  203. udata/templates/mail/account_deleted.txt +0 -6
  204. udata/templates/mail/account_inactivity.html +0 -40
  205. udata/templates/mail/account_inactivity.txt +0 -31
  206. udata/templates/mail/badge_added_association.html +0 -33
  207. udata/templates/mail/badge_added_association.txt +0 -11
  208. udata/templates/mail/badge_added_certified.html +0 -33
  209. udata/templates/mail/badge_added_certified.txt +0 -11
  210. udata/templates/mail/badge_added_company.html +0 -33
  211. udata/templates/mail/badge_added_company.txt +0 -11
  212. udata/templates/mail/badge_added_local_authority.html +0 -33
  213. udata/templates/mail/badge_added_local_authority.txt +0 -11
  214. udata/templates/mail/badge_added_public_service.html +0 -33
  215. udata/templates/mail/badge_added_public_service.txt +0 -11
  216. udata/templates/mail/discussion_closed.html +0 -47
  217. udata/templates/mail/discussion_closed.txt +0 -16
  218. udata/templates/mail/inactive_account_deleted.html +0 -5
  219. udata/templates/mail/inactive_account_deleted.txt +0 -6
  220. udata/templates/mail/membership_refused.html +0 -20
  221. udata/templates/mail/membership_refused.txt +0 -11
  222. udata/templates/mail/membership_request.html +0 -46
  223. udata/templates/mail/membership_request.txt +0 -12
  224. udata/templates/mail/new_discussion.html +0 -44
  225. udata/templates/mail/new_discussion.txt +0 -15
  226. udata/templates/mail/new_discussion_comment.html +0 -45
  227. udata/templates/mail/new_discussion_comment.txt +0 -16
  228. udata/templates/mail/new_member.html +0 -27
  229. udata/templates/mail/new_member.txt +0 -11
  230. udata/templates/mail/new_reuse.html +0 -37
  231. udata/templates/mail/new_reuse.txt +0 -9
  232. udata/templates/mail/test.html +0 -6
  233. udata/templates/mail/test.txt +0 -6
  234. udata/templates/mail/user_mail_card.html +0 -26
  235. udata/templates/security/email/base.html +0 -105
  236. udata/templates/security/email/base.txt +0 -6
  237. udata/templates/security/email/button.html +0 -3
  238. udata/templates/security/email/change_notice.html +0 -22
  239. udata/templates/security/email/change_notice.txt +0 -8
  240. udata/templates/security/email/confirmation_instructions.html +0 -20
  241. udata/templates/security/email/confirmation_instructions.txt +0 -7
  242. udata/templates/security/email/login_instructions.html +0 -19
  243. udata/templates/security/email/login_instructions.txt +0 -7
  244. udata/templates/security/email/reset_instructions.html +0 -24
  245. udata/templates/security/email/reset_instructions.txt +0 -9
  246. udata/templates/security/email/reset_notice.html +0 -11
  247. udata/templates/security/email/reset_notice.txt +0 -4
  248. udata/templates/security/email/welcome.html +0 -24
  249. udata/templates/security/email/welcome.txt +0 -9
  250. udata/templates/security/email/welcome_existing.html +0 -32
  251. udata/templates/security/email/welcome_existing.txt +0 -14
  252. udata/terms.md +0 -6
  253. udata/tests/frontend/__init__.py +0 -23
  254. udata/tests/metrics/conftest.py +0 -15
  255. {udata-12.0.2.dev15.dist-info → udata-13.0.1.dev21.dist-info}/WHEEL +0 -0
  256. {udata-12.0.2.dev15.dist-info → udata-13.0.1.dev21.dist-info}/entry_points.txt +0 -0
  257. {udata-12.0.2.dev15.dist-info → udata-13.0.1.dev21.dist-info}/licenses/LICENSE +0 -0
  258. {udata-12.0.2.dev15.dist-info → udata-13.0.1.dev21.dist-info}/top_level.txt +0 -0
@@ -1,37 +0,0 @@
1
- {% extends 'mail/base.html' %}
2
- {% from 'mail/button.html' import mail_button %}
3
- {% from 'reuse/mail_card.html' import reuse_mail_card with context %}
4
-
5
- {% block body %}
6
- <p style="margin: 0;padding: 0;">{{
7
- _('A new reuse of your dataset %(dataset)s has been published',
8
- dataset=(
9
- '<a href="'|safe
10
- + dataset.url_for(_mailCampaign=True)
11
- + '" style="text-decoration: none;">'|safe
12
- + dataset.title
13
- + '</a>'|safe
14
- )
15
- )
16
- }}.</p>
17
- <br/>
18
- <table width="100%" border="0" cellspacing="0" cellpadding="0">
19
- <tr>
20
- <td width="10%"></td>
21
- <td width="80%" align="center">
22
- {{ reuse_mail_card(reuse) }}
23
- </td>
24
- <td width="10%"></td>
25
- </tr>
26
- </table>
27
- <table width="100%" border="0" cellspacing="0" cellpadding="0">
28
- <tr>
29
- <td align="center">
30
- {{ mail_button(
31
- _('See the reuse'),
32
- reuse.url_for(),
33
- ) }}
34
- </td>
35
- </tr>
36
- </table>
37
- {% endblock %}
@@ -1,9 +0,0 @@
1
- {% extends 'mail/base.txt' %}
2
-
3
- {% block body %}
4
- {{ _('A new reuse "%(reuse)s" of your dataset "%(dataset)s" as been published',
5
- reuse=reuse.title, dataset=dataset.name
6
- ) }}.
7
- {{ _('You can see this new reuse on its own page:') }}
8
- {{ reuse.url_for() }}
9
- {% endblock %}
@@ -1,6 +0,0 @@
1
- {% extends 'mail/base.html' %}
2
-
3
- {% block body %}
4
- <p style="margin: 0;padding: 0;">{{ _('This is a test mail') }}</p>
5
- <p style="margin: 0;padding: 0;">{{_('If you read this, your mail configuration is working') }}</p>
6
- {% endblock %}
@@ -1,6 +0,0 @@
1
- {% extends 'mail/base.txt' %}
2
-
3
- {% block body %}
4
- {{ _('This is a test mail') }}
5
- {{ _('If you read this, your mail configuration is working') }}
6
- {% endblock %}
@@ -1,26 +0,0 @@
1
- {% macro user_mail_card(user, msg=None) %}
2
- <a href="{{ user.url_for(_mailCampaign=True) }}"
3
- style="margin: 0;padding: 0;width:100%;">
4
- <table height="60" cellpadding="0" cellspacing="0" style="margin: 0;padding: 0;border:1px solid #eee;width:100%;">
5
- <tr style="margin: 0;padding: 0;">
6
- <td width="64" style="margin: 0;padding: 0;">
7
- <img src="{{ user.avatar(60, external=True)|avatar_placeholder() }}" style="margin: 0;padding: 0;width: 60px;height: 60px" width="60" height="60">
8
- </td>
9
- <td style="margin: 0;padding: 0;">
10
- <table cellpadding="0" cellspacing="7" style="margin: 0;padding: 0;width: 100%;">
11
- <tr style="margin: 0;padding: 0;">
12
- <td style="margin: 0;padding: 0;">
13
- <h6 style="margin: 0;padding: 0;font-family: &quot;HelveticaNeue-Light&quot;, &quot;Helvetica Neue Light&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, &quot;Lucida Grande&quot;, sans-serif;line-height: 15px;margin-bottom: 10px;color: #444;font-weight: 900;font-size: 14px;">{{ user.fullname }}</h6>
14
- </td>
15
- </tr>
16
- <tr style="margin: 0;padding: 0;">
17
- <td style="margin: 0;padding: 0;font-family: &quot;Helvetica Neue&quot;, &quot;Helvetica&quot;, Helvetica, Arial, sans-serif;">
18
- {{ (msg or user.about)|mdstrip(100) }}
19
- </td>
20
- </tr>
21
- </table>
22
- </td>
23
- </tr>
24
- </table>
25
- </a>
26
- {% endmacro %}
@@ -1,105 +0,0 @@
1
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
- <html xmlns="http://www.w3.org/1999/xhtml" style="margin: 0;padding: 0;font-family: &quot;Helvetica Neue&quot;, &quot;Helvetica&quot;, Helvetica, Arial, sans-serif;">
3
- <head>
4
- <!-- If you delete this meta tag, Half Life 3 will never be released. -->
5
- <meta name="viewport" content="width=device-width">
6
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
7
- <title>{{config.SITE_TITLE}} - {{subject}}</title>
8
- <style>
9
- /* -------------------------------------------
10
- PHONE
11
- For clients that support media queries.
12
- Nothing fancy.
13
- -------------------------------------------- */
14
- @media only screen and (max-width: 600px) {
15
-
16
- a[class="btn"] { display:block!important; margin-bottom:10px!important; background-image:none!important; margin-right:0!important;}
17
-
18
- div[class="column"] { width: auto!important; float:none!important;}
19
-
20
- table.social div[class="column"] {
21
- width:auto!important;
22
- }
23
- }
24
- </style>
25
- {% block head %}{% endblock %}
26
- </head>
27
-
28
- <body bgcolor="#efefef" style="margin: 0;padding: 0;font-family: &quot;Helvetica Neue&quot;, &quot;Helvetica&quot;, Helvetica, Arial, sans-serif;-webkit-font-smoothing: antialiased;-webkit-text-size-adjust: none;height: 100%;color: #373737;width: 100%!important;background-color: #efefef;">
29
-
30
- <!-- HEADER -->
31
- <table class="head-wrap" cellpadding="0" cellspacing="0" style="margin: 0;padding: 0;font-family: &quot;Helvetica Neue&quot;, &quot;Helvetica&quot;, Helvetica, Arial, sans-serif;width: 100%;">
32
- <tr style="margin: 0;padding: 0;font-family: &quot;Helvetica Neue&quot;, &quot;Helvetica&quot;, Helvetica, Arial, sans-serif;">
33
- <td style="margin: 0;padding: 0;font-family: &quot;Helvetica Neue&quot;, &quot;Helvetica&quot;, Helvetica, Arial, sans-serif;"></td>
34
- <td class="header container" style="margin: 0 auto!important;padding: 0;font-family: &quot;Helvetica Neue&quot;, &quot;Helvetica&quot;, Helvetica, Arial, sans-serif;display: block!important;max-width: 628px!important;clear: both!important;">
35
-
36
- <div style="margin: 0;padding: 0;font-family: &quot;Helvetica Neue&quot;, &quot;Helvetica&quot;, Helvetica, Arial, sans-serif;">
37
- <table cellpadding="0" cellspacing="0" style="margin: 0;padding: 0;font-family: &quot;Helvetica Neue&quot;, &quot;Helvetica&quot;, Helvetica, Arial, sans-serif;">
38
- <tr style="margin: 0;padding: 0;font-family: &quot;Helvetica Neue&quot;, &quot;Helvetica&quot;, Helvetica, Arial, sans-serif;">
39
- <td align="center" class="head-message" style="margin: 0;padding: 16px;font-family: arial,helvetica,sans-serif;color: #888888;font-size: 11px;">
40
- {% if browser_url %}
41
- {% set link =
42
- '<a href="'|safe
43
- + browser_link
44
- + '&quot;Helvetica Neue&quot;, &quot;Helvetica&quot;, Helvetica, Arial, sans-serif;color: #2081c5;text-decoration: none;"> '|safe
45
- + _('on your browser.')
46
- + '</a>'|safe
47
- %}
48
- {{ _('View this email %(link)s', link=link) }}
49
- {% else %}
50
- &nbsp;
51
- {% endif %}
52
- </td>
53
- </tr>
54
- </table>
55
- </div>
56
-
57
- </td>
58
- <td style="margin: 0;padding: 0;font-family: &quot;Helvetica Neue&quot;, &quot;Helvetica&quot;, Helvetica, Arial, sans-serif;"></td>
59
- </tr>
60
- </table><!-- /HEADER -->
61
-
62
-
63
- <!-- BODY -->
64
- <table class="body-wrap" cellpadding="0" cellspacing="0" style="margin: 0;padding: 0;font-family: &quot;Helvetica Neue&quot;, &quot;Helvetica&quot;, Helvetica, Arial, sans-serif;width: 100%;">
65
-
66
-
67
-
68
- <tr style="margin: 0;padding: 0;font-family: &quot;Helvetica Neue&quot;, &quot;Helvetica&quot;, Helvetica, Arial, sans-serif;">
69
- <td style="margin: 0;padding: 0;font-family: &quot;Helvetica Neue&quot;, &quot;Helvetica&quot;, Helvetica, Arial, sans-serif;"></td>
70
- <td class="container" bgcolor="#FFFFFF" style="margin: 0 auto!important;padding: 0;font-family: &quot;Helvetica Neue&quot;, &quot;Helvetica&quot;, Helvetica, Arial, sans-serif;display: block!important;max-width: 628px!important;clear: both!important;">
71
-
72
- <div class="content" style="margin: 0 auto;padding: 35px 47px;font-family: &quot;Helvetica Neue&quot;, &quot;Helvetica&quot;, Helvetica, Arial, sans-serif;max-width: 628px;display: block;">
73
- <table style="margin: 0;padding: 0;font-family: &quot;Helvetica Neue&quot;, &quot;Helvetica&quot;, Helvetica, Arial, sans-serif;width: 100%;">
74
- <tr style="margin: 0;padding: 0;font-family: &quot;Helvetica Neue&quot;, &quot;Helvetica&quot;, Helvetica, Arial, sans-serif;">
75
- <td style="margin: 0;padding: 0;font-family: &quot;Helvetica Neue&quot;, &quot;Helvetica&quot;, Helvetica, Arial, sans-serif;">
76
- <h3 style="margin: 0;padding: 0;font-family: &quot;HelveticaNeue-Light&quot;, &quot;Helvetica Neue Light&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, &quot;Lucida Grande&quot;, sans-serif;line-height: 1.1;margin-bottom: 15px;color: #000;font-weight: 500;font-size: 24px;">{{ _('Hi %(user)s', user=user.first_name) }}</h3>
77
- </td>
78
- </tr>
79
- <tr style="margin: 0;padding: 0;">
80
- <td style="margin: 0;padding: 0;font-family: &quot;Helvetica Neue&quot;, &quot;Helvetica&quot;, Helvetica, Arial, sans-serif;margin-bottom: 20px;font-weight: normal;font-size: 14px;line-height: 1.5;">
81
- {% block body %}{% endblock %}
82
- </td>
83
- </tr>
84
-
85
- <tr style="margin: 0;padding: 0;">
86
- <td style="margin: 0;padding: 0;">
87
- <p style="margin: 0;padding: 0;font-family: &quot;Helvetica Neue&quot;, &quot;Helvetica&quot;, Helvetica, Arial, sans-serif;margin-top: 20px;margin-bottom: 20px;font-weight: normal;font-size: 14px;line-height: 1.5;">{{ _('See you soon on the platform') }}<br/>
88
- <i>{{ _('The %(site)s team', site=config.SITE_TITLE) }}</i></p>
89
- </td>
90
- </tr>
91
-
92
- </table>
93
-
94
- </div></td>
95
- </tr>
96
- </table>
97
- <!-- /content -->
98
-
99
-
100
- <td style="margin: 0;padding: 0;font-family: &quot;Helvetica Neue&quot;, &quot;Helvetica&quot;, Helvetica, Arial, sans-serif;"></td>
101
-
102
- <!-- /BODY -->
103
-
104
- </body>
105
- </html>
@@ -1,6 +0,0 @@
1
- {{ _('Hi %(user)s', user=user.first_name) }}
2
-
3
- {% block body %}{% endblock %}
4
-
5
- {{ _('See you soon on the platform') }}
6
- {{ _('The %(site)s team', site=config.SITE_TITLE) }}
@@ -1,3 +0,0 @@
1
- {% macro mail_button(label, url) %}
2
- <a class="btn" href="{{ url }}" style="margin: 30px 15px;padding: 8px 20px;font-family: &quot;Helvetica Neue&quot;, &quot;Helvetica&quot;, Helvetica, Arial, sans-serif;color: #ffffff;text-decoration: none;background-color: #438fc5;font-weight: bold;text-align: center;cursor: pointer;display: inline-block;font-size: 11px;text-transform: uppercase;">{{ label }}</a>
3
- {% endmacro %}
@@ -1,22 +0,0 @@
1
- {% extends 'security/email/base.html' %}
2
- {% from 'security/email/button.html' import mail_button %}
3
-
4
- {% block body %}
5
-
6
- <p>{{ _('Your password has been changed.') }}</p>
7
- <br/>
8
-
9
- {% if security.recoverable %}
10
- <p>{{ _('If you did not change your password, click below to reset it.') }}</p>
11
- <table width="100%" border="0" cellspacing="0" cellpadding="0">
12
- <tr>
13
- <td align="center">
14
- {{ mail_button(
15
- _('Reset password'),
16
- url_for('security.forgot_password', _external=True)
17
- ) }}
18
- </td>
19
- </tr>
20
- </table>
21
- {% endif %}
22
- {% endblock %}
@@ -1,8 +0,0 @@
1
- {% extends 'security/email/base.txt' %}
2
- {% block body %}
3
- {{ _('Your password has been changed') }}
4
- {% if security.recoverable %}
5
- {{ _('If you did not change your password, click the link below to reset it.') }}
6
- {{ url_for('security.forgot_password', _external=True) }}
7
- {% endif %}
8
- {% endblock %}
@@ -1,20 +0,0 @@
1
- {% extends 'security/email/base.html' %}
2
- {% from 'security/email/button.html' import mail_button %}
3
-
4
- {% block body %}
5
-
6
- <p>{{ _('Please confirm your email through the link below:') }}</p>
7
-
8
- <br/>
9
-
10
- <table width="100%" border="0" cellspacing="0" cellpadding="0">
11
- <tr>
12
- <td align="center">
13
- {{ mail_button(
14
- _('Confirm my account'),
15
- confirmation_link
16
- ) }}
17
- </td>
18
- </tr>
19
- </table>
20
- {% endblock %}
@@ -1,7 +0,0 @@
1
- {% extends 'security/email/base.txt' %}
2
- {% block body %}
3
- {{ _('Please confirm your email through the link below:') }}
4
-
5
- {{ confirmation_link }}
6
-
7
- {% endblock %}
@@ -1,19 +0,0 @@
1
- {% extends 'security/email/base.html' %}
2
- {% from 'security/email/button.html' import mail_button %}
3
-
4
- {% block body %}
5
-
6
- <p>{{ _('You can log into your account through the link below:') }}</p>
7
- <br/>
8
-
9
- <table width="100%" border="0" cellspacing="0" cellpadding="0">
10
- <tr>
11
- <td align="center">
12
- {{ mail_button(
13
- _('Login now'),
14
- login_link
15
- ) }}
16
- </td>
17
- </tr>
18
- </table>
19
- {% endblock %}
@@ -1,7 +0,0 @@
1
- {% extends 'security/email/base.txt' %}
2
- {% block body %}
3
- {{ _('You can log into your account through the link below:') }}
4
-
5
- {{ login_link }}
6
-
7
- {% endblock %}
@@ -1,24 +0,0 @@
1
- {% extends 'security/email/base.html' %}
2
- {% from 'security/email/button.html' import mail_button %}
3
-
4
- {% block body %}
5
-
6
- <p>
7
- {{ _('Someone has requested a password reset for your %(site)s account. If you didn\'t, please ignore this email.', site=config.SITE_TITLE) }}
8
- </p>
9
- <p>
10
- {{ _('To reset your password, please confirm your request through the link below:') }}
11
- </p>
12
- <br/>
13
-
14
- <table width="100%" border="0" cellspacing="0" cellpadding="0">
15
- <tr>
16
- <td align="center">
17
- {{ mail_button(
18
- _('Reset my password'),
19
- cdata_url("/reset/" ~ reset_token) or reset_link
20
- ) }}
21
- </td>
22
- </tr>
23
- </table>
24
- {% endblock %}
@@ -1,9 +0,0 @@
1
- {% extends 'security/email/base.txt' %}
2
- {% block body %}
3
- {{ _('Someone has requested a password reset for your %(site)s account. If you didn\'t, please ignore this email.', site=config.SITE_TITLE) }}
4
-
5
- {{ _('To reset your password, please confirm your request through the link below:') }}
6
-
7
- {{ cdata_url("/reset/" ~ reset_token) or reset_link }}
8
-
9
- {% endblock %}
@@ -1,11 +0,0 @@
1
- {% extends 'security/email/base.html' %}
2
- {% from 'security/email/button.html' import mail_button %}
3
-
4
- {% block body %}
5
-
6
- <p>
7
- {{ _('Your password for %(site)s has been reset.', site=config.SITE_TITLE) }}
8
- </p>
9
-
10
- <br/>
11
- {% endblock %}
@@ -1,4 +0,0 @@
1
- {% extends 'security/email/base.txt' %}
2
- {% block body %}
3
- {{ _('Your password for %(site)s has been reset.', site=config.SITE_TITLE) }}
4
- {% endblock %}
@@ -1,24 +0,0 @@
1
- {% extends 'security/email/base.html' %}
2
- {% from 'security/email/button.html' import mail_button %}
3
-
4
- {% block body %}
5
-
6
- <p>
7
- {{ _('Welcome to %(site)s!', site=config.SITE_TITLE) }}
8
- </p>
9
- <p>
10
- {{ _('To activate your account, please confirm your email address through the link below:') }}
11
- </p>
12
- <br/>
13
-
14
- <table width="100%" border="0" cellspacing="0" cellpadding="0">
15
- <tr>
16
- <td align="center">
17
- {{ mail_button(
18
- _('Confirm now'),
19
- confirmation_link
20
- ) }}
21
- </td>
22
- </tr>
23
- </table>
24
- {% endblock %}
@@ -1,9 +0,0 @@
1
- {% extends 'security/email/base.txt' %}
2
- {% block body %}
3
- {{ _('Welcome to %(site)s!', site=config.SITE_TITLE) }}
4
-
5
- {{ _('To activate your account, please confirm your email address through the link below:') }}
6
-
7
- {{ confirmation_link }}
8
-
9
- {% endblock %}
@@ -1,32 +0,0 @@
1
- {% extends 'security/email/base.html' %}
2
- {% from 'security/email/button.html' import mail_button %}
3
-
4
- {% block body %}
5
-
6
- <p>
7
- {{ _('Hello %(email)s!', email=user.email) }}
8
- </p>
9
- <p>
10
- {{ _('Someone (you?) tried to register this email - which is already in our system.') }}
11
- </p>
12
- {% if user.username %}
13
- <p>
14
- {{ _('This account also has the following username associated with it: %(username)s.', username=user.username) }}
15
- </p>
16
- {% endif %}
17
- {% if recovery_link %}
18
- <p>
19
- {{ _('If you forgot your password you can reset it') }}
20
- </p>
21
- <table width="100%" border="0" cellspacing="0" cellpadding="0">
22
- <tr>
23
- <td align="center">
24
- {{ mail_button(
25
- _('Here'),
26
- recovery_link
27
- ) }}
28
- </td>
29
- </tr>
30
- </table>
31
- {% endif %}
32
- {% endblock %}
@@ -1,14 +0,0 @@
1
- {% extends 'security/email/base.txt' %}
2
- {% block body %}
3
- {{ _('Hello') }}
4
- {{ _('Someone (you?) tried to register this email - which is already in our system.') }}
5
-
6
- {% if user.username %}
7
- {{ _('This account also has the following username associated with it: %(username)s', username=user.username) }}
8
- {% endif %}
9
-
10
- {% if recovery_link %}
11
- {{ _('If you forgot your password you can reset it with the following link:') }}
12
- {{ recovery_link }}
13
- {% endif %}
14
- {% endblock %}
udata/terms.md DELETED
@@ -1,6 +0,0 @@
1
- # Generic terms and conditions
2
-
3
- Be excellent to each other.
4
-
5
- You see this content because you don't have provided a proper `SITE_TERMS_LOCATION` setting
6
- pointing to the rightful content.
@@ -1,23 +0,0 @@
1
- import json
2
- import re
3
-
4
- from udata.tests import DBTestMixin, TestCase, WebTestMixin
5
-
6
-
7
- class FrontTestCase(WebTestMixin, DBTestMixin, TestCase):
8
- modules = []
9
-
10
- def get_json_ld(self, response):
11
- # In the pattern below, we extract the content of the JSON-LD script
12
- # The first ? is used to name the extracted string
13
- # The second ? is used to express the non-greediness of the extraction
14
- pattern = (
15
- r'<script id="json_ld" type="application/ld\+json">'
16
- r"(?P<json_ld>[\s\S]*?)"
17
- r"</script>"
18
- )
19
- data = response.data.decode("utf8")
20
- search = re.search(pattern, data)
21
- self.assertIsNotNone(search, (pattern, data))
22
- json_ld = search.group("json_ld")
23
- return json.loads(json_ld)
@@ -1,15 +0,0 @@
1
- import pytest
2
-
3
- from udata import settings
4
- from udata.app import create_app
5
-
6
-
7
- class MetricsSettings(settings.Testing):
8
- PLUGINS = ["metrics"]
9
- METRICS_API = "http://metrics-api.fr/api"
10
-
11
-
12
- @pytest.fixture
13
- def app():
14
- app = create_app(settings.Defaults, override=MetricsSettings)
15
- return app