udata 8.0.1__py2.py3-none-any.whl → 8.0.1.dev28882__py2.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.
- udata/__init__.py +1 -1
- udata/api/__init__.py +3 -6
- udata/api/oauth2.py +1 -2
- udata/core/badges/models.py +1 -2
- udata/core/dataset/apiv2.py +0 -2
- udata/core/dataset/models.py +0 -1
- udata/core/dataset/rdf.py +1 -21
- udata/core/metrics/models.py +3 -2
- udata/core/organization/api_fields.py +3 -28
- udata/core/organization/models.py +1 -3
- udata/core/owned.py +2 -39
- udata/core/spatial/api.py +4 -4
- udata/core/user/api.py +7 -11
- udata/core/user/models.py +2 -13
- udata/harvest/backends/dcat.py +8 -14
- udata/harvest/tests/dcat/catalog.xml +0 -1
- udata/harvest/tests/test_dcat_backend.py +0 -3
- udata/routing.py +0 -6
- udata/settings.py +1 -4
- udata/static/admin.css +2 -2
- udata/static/admin.css.map +1 -1
- udata/static/chunks/{0.93c3ae13b5b94753ee80.js → 0.6f1698738c9b0618b673.js} +3 -3
- udata/static/chunks/0.6f1698738c9b0618b673.js.map +1 -0
- udata/static/chunks/{14.e64890872b31c55fcdf7.js → 14.f4037a917d5364cb564b.js} +2 -2
- udata/static/chunks/14.f4037a917d5364cb564b.js.map +1 -0
- udata/static/chunks/{2.614b3e73b072982fd9b1.js → 2.7c89fae92899be371ed3.js} +2 -2
- udata/static/chunks/2.7c89fae92899be371ed3.js.map +1 -0
- udata/static/chunks/{5.48417db6b33328fa9d6a.js → 5.3dc97ea195d251881552.js} +2 -2
- udata/static/chunks/5.3dc97ea195d251881552.js.map +1 -0
- udata/static/common.js +1 -1
- udata/static/common.js.map +1 -1
- udata/tests/api/__init__.py +0 -3
- udata/tests/api/test_organizations_api.py +5 -78
- udata/tests/api/test_user_api.py +13 -47
- udata/tests/plugin.py +0 -5
- {udata-8.0.1.dist-info → udata-8.0.1.dev28882.dist-info}/METADATA +3 -12
- {udata-8.0.1.dist-info → udata-8.0.1.dev28882.dist-info}/RECORD +41 -46
- udata/api_fields.py +0 -254
- udata/core/dataservices/__init__.py +0 -0
- udata/core/dataservices/api.py +0 -84
- udata/core/dataservices/models.py +0 -130
- udata/static/chunks/0.93c3ae13b5b94753ee80.js.map +0 -1
- udata/static/chunks/14.e64890872b31c55fcdf7.js.map +0 -1
- udata/static/chunks/2.614b3e73b072982fd9b1.js.map +0 -1
- udata/static/chunks/5.48417db6b33328fa9d6a.js.map +0 -1
- udata/tests/api/test_dataservices_api.py +0 -236
- {udata-8.0.1.dist-info → udata-8.0.1.dev28882.dist-info}/LICENSE +0 -0
- {udata-8.0.1.dist-info → udata-8.0.1.dev28882.dist-info}/WHEEL +0 -0
- {udata-8.0.1.dist-info → udata-8.0.1.dev28882.dist-info}/entry_points.txt +0 -0
- {udata-8.0.1.dist-info → udata-8.0.1.dev28882.dist-info}/top_level.txt +0 -0
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
tasks/__init__.py,sha256=CnVhb_TV-6nMhxVR6itnBmvuU2OSCs02AfNB4irVBTE,8132
|
|
2
2
|
tasks/helpers.py,sha256=k_HiuiEJNgQLvWdeHqczPOAcrYpFjEepBeKo7EQzY8M,994
|
|
3
|
-
udata/__init__.py,sha256=
|
|
4
|
-
udata/api_fields.py,sha256=myHkndhedV3g9cn2FWBu1Hx24Fy-fxaGedEP1ZMOoi0,11506
|
|
3
|
+
udata/__init__.py,sha256=qPn-jr9CTcAEJ6KD95BxAliMbSxwtelLc8fyakV7UO0,101
|
|
5
4
|
udata/app.py,sha256=6upwrImLaWrSYtsXPW1zH84_oRxp3B6XFuocMe2D6NU,7329
|
|
6
5
|
udata/assets.py,sha256=aMa-MnAEXVSTavptSn2V8sUE6jL_N0MrYCQ6_QpsuHs,645
|
|
7
6
|
udata/entrypoints.py,sha256=8bZUvZ8ICO3kZxa8xDUaen6YS_OAGNKHFvaD7d8BOk0,2687
|
|
@@ -10,9 +9,9 @@ udata/factories.py,sha256=6en2qdHHoR6rEvNEUeH_0-T-vR7x7GUBGgNEm9vuylE,492
|
|
|
10
9
|
udata/i18n.py,sha256=E-JoY57Cv4vgPvChkWjpwZAbuYVI8e6BO6raeu_3_Pw,8352
|
|
11
10
|
udata/mail.py,sha256=dAMcbEtk5e54alpQezvF5adDrRPgdaT36QEdHD_5v50,2145
|
|
12
11
|
udata/rdf.py,sha256=QiHcK2iklbtPkl6UFdBxTj0oaiY41en9k-kmbIVJ8Xw,9893
|
|
13
|
-
udata/routing.py,sha256=
|
|
12
|
+
udata/routing.py,sha256=lU1XNL-YQgx1GN3pjKue1tIjHzjO3QdTiF9aaLNLitg,7044
|
|
14
13
|
udata/sentry.py,sha256=KiZz0PpmYpZMvykH9UAbHpF4xBY0Q-8DeiEbXEHDUdw,2683
|
|
15
|
-
udata/settings.py,sha256=
|
|
14
|
+
udata/settings.py,sha256=5cU5_oiPiuS8RS98F9qfCp37qbjjN_g8ipoyZjDQP0M,17298
|
|
16
15
|
udata/sitemap.py,sha256=pjtR2lU3gRHvK8l1Lw8B9wrqMMTYC5adUfFh0pUp_Q4,977
|
|
17
16
|
udata/tags.py,sha256=8MvgyjfUz8O71tCV0V1fQV4_0C2P-SLFrm2IA2QfNDs,595
|
|
18
17
|
udata/tasks.py,sha256=Dyjoxp6_IuPZSnKi6KmaFrFvnyCM5EF5g_W-jG0qYIo,4930
|
|
@@ -24,11 +23,11 @@ udata/worker.py,sha256=K-Wafye5-uXP4kQlffRKws2J9YbJ6m6n2QjcVsY8Nsg,118
|
|
|
24
23
|
udata/wsgi.py,sha256=P7AJvZ5JqY4uRSBOzaFiBniChWIU9RVQ-Y0PN4vCCMY,77
|
|
25
24
|
udata/admin/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
26
25
|
udata/admin/views.py,sha256=wMlpnC1aINW-6JDk6-kQXhcTYBZH-5wajEuWzVDcIKA,331
|
|
27
|
-
udata/api/__init__.py,sha256=
|
|
26
|
+
udata/api/__init__.py,sha256=BPpjd6jmGm3nAKl3QpB7qIP72_3dAoO__3-X0CHPhzw,11236
|
|
28
27
|
udata/api/commands.py,sha256=oK2p1VdUvULDdYuvYYpYvY_bdkPJy-KfROfoX71oOuA,3277
|
|
29
28
|
udata/api/errors.py,sha256=Sy_f3WVrNTUPZjCOogIVgocDdUjnKz149KDi4mMA_Lg,240
|
|
30
29
|
udata/api/fields.py,sha256=l-Fa27-easR86qgof2bk130jq1N1pNUgGmQzok1UI3Q,3094
|
|
31
|
-
udata/api/oauth2.py,sha256=
|
|
30
|
+
udata/api/oauth2.py,sha256=ERppP1FtigiAJXO01IjhFFzG8ajPVD6gPcKpBrjHFO4,11726
|
|
32
31
|
udata/api/parsers.py,sha256=Fo4krCaFao0D1QNqKpjWiFVvKVLd9b_2mon6RbbOXls,1485
|
|
33
32
|
udata/api/signals.py,sha256=9zcw4NDdpJwhgsS5UyLtnls1w_RfqghYFULza6d4-cw,162
|
|
34
33
|
udata/auth/__init__.py,sha256=ziR6gzkE1V4__3ynjE-_IPWHzmapOsZIrnaDAjDijsM,1958
|
|
@@ -53,7 +52,7 @@ udata/commands/worker.py,sha256=zek8YRxCESrZIULhx9D9RQOPFc4WwhYm2sF7-PPbEKY,4028
|
|
|
53
52
|
udata/commands/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
54
53
|
udata/commands/tests/fixtures.py,sha256=h78grSpZDgOwvmezyD3qBpiSnpxaQ9tDeQOr3sB8EiY,1581
|
|
55
54
|
udata/core/__init__.py,sha256=n7TBP0lkYJl-BLoc67V5fyaawrWmsrWG_mLIF49UFOY,385
|
|
56
|
-
udata/core/owned.py,sha256=
|
|
55
|
+
udata/core/owned.py,sha256=sLI4UpVuMukMEkC3K9Iwjl6P6Cz25J48M6VZc_-HZRQ,2718
|
|
57
56
|
udata/core/activity/__init__.py,sha256=4vB92owvzwn2VVxbFWGNcfESb6izDzvbj6lmLH4ssrU,299
|
|
58
57
|
udata/core/activity/api.py,sha256=ohDEbzhbsmJ6YHQh3Aa8wYctaDQGuwKdg0kjh3lC028,3276
|
|
59
58
|
udata/core/activity/models.py,sha256=kzy9kcixX3DUo-2YpVjGXVHR4cOZMl7AsPiDBZ52EDs,2118
|
|
@@ -65,7 +64,7 @@ udata/core/badges/commands.py,sha256=NMihQH6ABUlkYpR2lNFW4dkeaWOjpijW7voudww8zW4
|
|
|
65
64
|
udata/core/badges/factories.py,sha256=rDQC28fKLtYA6l69EqiyOQyN4C2jVj87EdKBEo4sYsw,297
|
|
66
65
|
udata/core/badges/fields.py,sha256=rpeyZcw5-oU8FZXPnzU9-rGrwW5vCyhwgei7aAR-n3I,255
|
|
67
66
|
udata/core/badges/forms.py,sha256=8z28_rln9duvJ7IvKx9IFO9DAMe3cU2bv0FQRdiMFEw,511
|
|
68
|
-
udata/core/badges/models.py,sha256=
|
|
67
|
+
udata/core/badges/models.py,sha256=cQBpLudR-cRxlbN68z_05UbX0BXRu97n1vMMdat4Ry4,3176
|
|
69
68
|
udata/core/badges/permissions.py,sha256=5jFKFG4OlVp0pL0xSa7AGO0Ttn0QMsy9xEY2jTfKVmE,552
|
|
70
69
|
udata/core/badges/signals.py,sha256=T12kgKO1lmIbdXlKnRmedYRnJzC2PZIMkrtcA1U2mNo,237
|
|
71
70
|
udata/core/badges/tasks.py,sha256=LA1Sd0B0uUa6OANqmx0t-kDNK99uGePwwtilsdj9Evw,431
|
|
@@ -78,15 +77,12 @@ udata/core/contact_point/api_fields.py,sha256=KQADF7Drnd1uT9ZWjLRKQPJh6GdGUXJkYf
|
|
|
78
77
|
udata/core/contact_point/factories.py,sha256=ATuV1seBCGKY3CzvPDG5nxfBBqHu-3YtER0_fiQJx6c,248
|
|
79
78
|
udata/core/contact_point/forms.py,sha256=ggLhSJ1IRn5MclrhydckjAxwr4fFZxgAD4huSSucSsA,598
|
|
80
79
|
udata/core/contact_point/models.py,sha256=NlNKureCpzgTLJuGviZPjNx-ABYRp4j2L-ur9Gmixao,324
|
|
81
|
-
udata/core/dataservices/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
82
|
-
udata/core/dataservices/api.py,sha256=j0_fQdq_O3zBqY7PGapmNbeMjb2sS4x8jr3cTM-4i_Q,2803
|
|
83
|
-
udata/core/dataservices/models.py,sha256=G8m-YKHf32DdA-3Q4m-hlQCLZ8ZZUFKaRFD0YZtqvbE,4037
|
|
84
80
|
udata/core/dataset/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
85
81
|
udata/core/dataset/actions.py,sha256=3pzBg_qOR-w7fwPpTOKUHXWC9lkjALbOn1UQFmmT-s0,1199
|
|
86
82
|
udata/core/dataset/activities.py,sha256=qQnHNL0hOB1IGtQl7JsnVOiUsWT0gm-pts9uDyR3bvU,1536
|
|
87
83
|
udata/core/dataset/api.py,sha256=C6EGhJswCb2hHfKigbxFQbfzpzgvWm8VD3c4O-ZQFso,28789
|
|
88
84
|
udata/core/dataset/api_fields.py,sha256=Cgd_BPlAhP0nTzocOZWWEM-LvKcgCxYE2x00oAiKFYM,15405
|
|
89
|
-
udata/core/dataset/apiv2.py,sha256=
|
|
85
|
+
udata/core/dataset/apiv2.py,sha256=XzEwtmC53Mw0mq8NEMCD2cN52pCmrUkPu0adUj4wGyw,15751
|
|
90
86
|
udata/core/dataset/commands.py,sha256=dbK7gMYH4G6pOPiYtmL3yomzg5MGqTaG97_UM9Smu_k,3712
|
|
91
87
|
udata/core/dataset/constants.py,sha256=Twml-I5mGiIdTkiDV1D4bXqi_TcNhcEc-QFxorUKHM4,3138
|
|
92
88
|
udata/core/dataset/csv.py,sha256=d6JMuvlov_vR7EN10rJa6Q03Il0PfbzMTHQIud5H8qg,3240
|
|
@@ -94,10 +90,10 @@ udata/core/dataset/events.py,sha256=DI71VfRc1eDTtgWQ3TJx5gtUw2MO0O_CVLCKLq0OIF0,
|
|
|
94
90
|
udata/core/dataset/exceptions.py,sha256=uI_NvZRZMr_MtYQBYdLD8tk-BIUeDDfMMcrWwqV7mi8,494
|
|
95
91
|
udata/core/dataset/factories.py,sha256=fHPgEUUpqGw7p7K5wGg-wA6Q0-Pc9eNbzAQK-va8zMM,9120
|
|
96
92
|
udata/core/dataset/forms.py,sha256=VJCsGtgzhQgLW-M-J4ObpQ8o6c_saC3TTc1Js33m3sQ,6188
|
|
97
|
-
udata/core/dataset/models.py,sha256=
|
|
93
|
+
udata/core/dataset/models.py,sha256=Z9Sqf-Aly67BB5ESwz3H4qxJvG3zy03Goz6enL55HyE,36022
|
|
98
94
|
udata/core/dataset/permissions.py,sha256=3F2J7le3_rEYNhh88o3hSRWHAAt01_yHJM6RPmvCrRo,1090
|
|
99
95
|
udata/core/dataset/preview.py,sha256=puPKT3fBD7ezAcT6owh0JK1_rGNDFZOqgT223qGn3LY,2597
|
|
100
|
-
udata/core/dataset/rdf.py,sha256=
|
|
96
|
+
udata/core/dataset/rdf.py,sha256=oQqVpDvDCQKsfp5LKlIXACxLg89LpA2ydbkICxZCvT0,22830
|
|
101
97
|
udata/core/dataset/search.py,sha256=Ca23ljX7TZiKZKiAZQIH5xwS2tjXQcTDzieAJd-E22c,5314
|
|
102
98
|
udata/core/dataset/signals.py,sha256=TK6dfrOUitZZkGGOh6XmhYqYvIjzZpI70JTLV4k-JRM,161
|
|
103
99
|
udata/core/dataset/tasks.py,sha256=UYdm_O9hA0yo7cCNQFvZE9pGzUshkc3Wr4Gpel2aupU,8434
|
|
@@ -127,13 +123,13 @@ udata/core/jobs/forms.py,sha256=CB_z8JSyvSSJX1XhohsQ1S3kdOhTMgzsFTofso7AD60,1495
|
|
|
127
123
|
udata/core/jobs/models.py,sha256=3vRfBp8e7KqJgKxTSSeMgfsMu07rAz1o_IfsYBFk9o4,1325
|
|
128
124
|
udata/core/metrics/__init__.py,sha256=Q3nZVl7no0E1ygz7zNJH-KCa-m9FV6wAH2_y6zimcek,397
|
|
129
125
|
udata/core/metrics/commands.py,sha256=74L6PUJyaTnr4w-_redN9ucY0v-3Vi4QumWHKZ__DYE,5143
|
|
130
|
-
udata/core/metrics/models.py,sha256=
|
|
126
|
+
udata/core/metrics/models.py,sha256=v0xlLxl2Y9QdILW4DTZ1WzUy2a4XTNepdLNKmb8T8LY,287
|
|
131
127
|
udata/core/metrics/signals.py,sha256=Xs_k-9lWzsoZU5Joli-41FNgvIVvbAejkjSFB6DHxh0,176
|
|
132
128
|
udata/core/metrics/tasks.py,sha256=Z7La3-zPB5j6qJoPKr_MgjNZhqscZCmNLPa711ZBkdY,797
|
|
133
129
|
udata/core/organization/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
134
130
|
udata/core/organization/activities.py,sha256=fOBujmduVoTxJph2C6Z4qHeQHOaJT9IsZooEDCWC4BA,1140
|
|
135
131
|
udata/core/organization/api.py,sha256=K9Lnps_gxxt_z1ImLZDBnY1eeh6Zpl7x50YoXcPzJ_k,17479
|
|
136
|
-
udata/core/organization/api_fields.py,sha256=
|
|
132
|
+
udata/core/organization/api_fields.py,sha256=UV3DE7DoWvrRs2k-VnuJ2c7-mMTt93eVX8o-K_9IvXQ,5403
|
|
137
133
|
udata/core/organization/apiv2.py,sha256=VAU_y9Zz-VhBgS-LWVbGOEZdSt3b44nZd5bzTV2wU8g,3206
|
|
138
134
|
udata/core/organization/commands.py,sha256=FaSYxyWfQDR5tWvrAXmwcF2VMREOC13XTK8DD4vp_sY,1623
|
|
139
135
|
udata/core/organization/constants.py,sha256=XGVnItrJTG0hcVKRK5sPmx44KHC9r_EKtj_y0MmBt0o,563
|
|
@@ -141,7 +137,7 @@ udata/core/organization/csv.py,sha256=x0afMfhWYvx_karwuw5jXqBhMbzkrsiEuAq1wTVurZ
|
|
|
141
137
|
udata/core/organization/factories.py,sha256=5BABVcDhEChRhJsDfCDm8WyJG4l9j3H1_OFZa3VtlVs,646
|
|
142
138
|
udata/core/organization/forms.py,sha256=JXXv4tQGbIbICti7RXLVZdnc6VujATmLhDrHIsFxBME,3550
|
|
143
139
|
udata/core/organization/metrics.py,sha256=45NDcsFV-oJJQUuq6AyIDXjR-RNubwYWF5-Ke8KrPDY,777
|
|
144
|
-
udata/core/organization/models.py,sha256=
|
|
140
|
+
udata/core/organization/models.py,sha256=Y7iFRQY6m87nKZNUMK9qsZJXZ6xzA6t2q_YxAm8K7Dg,8315
|
|
145
141
|
udata/core/organization/notifications.py,sha256=j-2LIHZ5y5QuVietWAWOrAqf4v1HMCtSDZ0w7V-z_1c,763
|
|
146
142
|
udata/core/organization/permissions.py,sha256=cNIPiPgXVW2hvKqbuKHA_62tX2xaT8jiVJ3BEfnsHn0,1299
|
|
147
143
|
udata/core/organization/rdf.py,sha256=ZSoxyZDj_5g6hv7lbTIy6bIW3xwvQy27rWNgJwtZ6LE,1762
|
|
@@ -187,7 +183,7 @@ udata/core/spam/signals.py,sha256=4VVLyC2I39LFAot4P56nHzY0xumjMBDz_N0Ff_kgBd0,15
|
|
|
187
183
|
udata/core/spam/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
188
184
|
udata/core/spam/tests/test_spam.py,sha256=W1Ck_rsnURhFi0fy5xOO0CPpW9MuUFbr-NmPZdk5R4Q,676
|
|
189
185
|
udata/core/spatial/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
190
|
-
udata/core/spatial/api.py,sha256=
|
|
186
|
+
udata/core/spatial/api.py,sha256=8viSuSSfjZY6GrPj5Ax9WJIYr9KD4YBWAqSd3vhQz50,5666
|
|
191
187
|
udata/core/spatial/api_fields.py,sha256=ymGK3FyE2KNlASOU5GiPgZGeBjjOqnOyCOcRCbuw3D8,2629
|
|
192
188
|
udata/core/spatial/commands.py,sha256=qdJ4mUg3NUTrGx6L5MKPh1usvxmeCn8xMCZNGKyjWYE,6914
|
|
193
189
|
udata/core/spatial/constants.py,sha256=u_4OwAAVYqT0VX6nw_Hc4wIRUPcYww19EFJcnWuMZNo,146
|
|
@@ -223,14 +219,14 @@ udata/core/topic/parsers.py,sha256=p2JCGfjeqb5GQTstZssclzLRLqUHy7KWJ7TDcLSF51M,2
|
|
|
223
219
|
udata/core/topic/permissions.py,sha256=RtFPPlxuU_Bv7ip6LDO4AoPrKFnIOEs9cCMXaSSmEdk,118
|
|
224
220
|
udata/core/user/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
225
221
|
udata/core/user/activities.py,sha256=AMRbYgum8uJXAS3L-ddQN-xKtKRvsmesDZ0ItBY_jS0,2799
|
|
226
|
-
udata/core/user/api.py,sha256=
|
|
222
|
+
udata/core/user/api.py,sha256=QQmTsUfm_RB698xkRPSSZduGPtvMM1WKGzupdUICFw4,12738
|
|
227
223
|
udata/core/user/api_fields.py,sha256=aWw-vaLy5KqE8vr6HtWzoAbzHI8aoi9BV-m-oY7FJfo,5052
|
|
228
224
|
udata/core/user/commands.py,sha256=DlNBFaojhhPHH4kZazp0NMwYWnzPZXBba_vqH-cfR1U,3156
|
|
229
225
|
udata/core/user/constants.py,sha256=aTluhTR2RGZ_cdG7-mkEoT5Ndbg8BNUwwzCOld0aLMY,77
|
|
230
226
|
udata/core/user/factories.py,sha256=JiY-AghapelwhAVAExiUEHS1odyIu4PppWuhtZnkjBY,790
|
|
231
227
|
udata/core/user/forms.py,sha256=XKhZFiXtTp_o0J4feLI2RQAjsmrf2CsyRQJ8n_gFVVg,992
|
|
232
228
|
udata/core/user/metrics.py,sha256=elq1UFXSWrPBdZiHZ8uiuaV5k8g0OTXIkQ0VDW2ND2A,926
|
|
233
|
-
udata/core/user/models.py,sha256=
|
|
229
|
+
udata/core/user/models.py,sha256=VTIdPE4yROvcIUFpEd6GH0IA_v36pACWqFo3i1Ko-YM,9503
|
|
234
230
|
udata/core/user/permissions.py,sha256=unBqNHcTAFYpN_kn0FTDLOYMPyWVeOvW7TQyeJkUI-M,436
|
|
235
231
|
udata/core/user/rdf.py,sha256=pE0ISNBgQ3AnbtuzCE91XQmi5Cq_S0cMehbaqZFww7Q,867
|
|
236
232
|
udata/core/user/tasks.py,sha256=drBhjauaydPcZb7y4ton6PhlXd5rmmZe5EbPWCzELkA,317
|
|
@@ -277,13 +273,13 @@ udata/harvest/signals.py,sha256=wlXTi1E7rIVyNvxw0yUqyN5gF3thg276LAOmAF9vDJY,1338
|
|
|
277
273
|
udata/harvest/tasks.py,sha256=0VhefKCQJSU_puTpdKOpvt3WORXHAFWGEB-R_MhB12M,1981
|
|
278
274
|
udata/harvest/backends/__init__.py,sha256=qcLhHKWO97TeWd93ZwymG_Cc9FO7sMM7h4fs6XYdtS8,447
|
|
279
275
|
udata/harvest/backends/base.py,sha256=oaPQcQ0onIXH5ofUtWH5sM6_5_wSBLawHSOjeeoG6jQ,12258
|
|
280
|
-
udata/harvest/backends/dcat.py,sha256=
|
|
276
|
+
udata/harvest/backends/dcat.py,sha256=SCbWorkuNzM7OvzFzBh1Is4QTWquOcnCLa_yd3HbgW0,14846
|
|
281
277
|
udata/harvest/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
282
278
|
udata/harvest/tests/factories.py,sha256=CbQORC1OJ1_Agtv_3LjCXysNumjMYlROwZPSEAHo8sM,2005
|
|
283
279
|
udata/harvest/tests/test_actions.py,sha256=7xSpouCAcf5p_bd38zHCyPN7sKWUUZXA7IlpI-yNVrQ,27603
|
|
284
280
|
udata/harvest/tests/test_api.py,sha256=QXhseHfnkBEmMbIJzroMdDYGLDj6Njal1s-2sn0xhEM,14888
|
|
285
281
|
udata/harvest/tests/test_base_backend.py,sha256=JA8Df1Eu-lEPLZfxyK81bsmT6exOjV_3PtKHJekAp5g,12092
|
|
286
|
-
udata/harvest/tests/test_dcat_backend.py,sha256=
|
|
282
|
+
udata/harvest/tests/test_dcat_backend.py,sha256=zZea9e2awtFiLrdREeaHcp9d6tSHhAHEuXr_fc5fKjk,32462
|
|
287
283
|
udata/harvest/tests/test_filters.py,sha256=V2HFZlexIJa6r1DX6g2ktvIgjg4gSY11QPfPOd3_Oug,2370
|
|
288
284
|
udata/harvest/tests/test_models.py,sha256=p2VazyrPXSArBuf8Kf19TGPcQ86SnOGCGmvjcMOw0s0,924
|
|
289
285
|
udata/harvest/tests/test_notifications.py,sha256=ZwtwioittW3XcZc0x6zbHjs1dVaAxPytlVymnJa5w0E,817
|
|
@@ -297,7 +293,7 @@ udata/harvest/tests/csw_dcat/geonetworkv4-page-3.xml,sha256=fsN0E4TVd_ts-sYA612y
|
|
|
297
293
|
udata/harvest/tests/csw_dcat/geonetworkv4-page-5.xml,sha256=0VmPp1kspik7YAmOFyr-3yJLzWGA6kuQp_x_w-W385o,21213
|
|
298
294
|
udata/harvest/tests/dcat/bnodes.jsonld,sha256=Leqny-ccp30564yojQYYckw_HKbhR0f5qUCaavc2ruE,7964
|
|
299
295
|
udata/harvest/tests/dcat/bnodes.xml,sha256=xuOcd9uEDRlvn9HOVqEPz-Pe3g4DCygTIChZZiA4jac,9470
|
|
300
|
-
udata/harvest/tests/dcat/catalog.xml,sha256=
|
|
296
|
+
udata/harvest/tests/dcat/catalog.xml,sha256=pBVSNZzA4gkgxHCttrjuBBVSumLFgXgvtSgnHr0ybk4,9239
|
|
301
297
|
udata/harvest/tests/dcat/evian.json,sha256=EeJT9NKrV4hfGfnkJVZG4gJaSLtzjNUBKu9rFO1KgHk,16646
|
|
302
298
|
udata/harvest/tests/dcat/flat.jsonld,sha256=BAw08MDhtW9Px3q6RAoTIqO_OwJmAwBS9EpC8BY_x98,8459
|
|
303
299
|
udata/harvest/tests/dcat/geonetwork.xml,sha256=9_pksE74Zzkbgs9okj6hEbo8CJS0FZjEnIdvopKfm7k,7928
|
|
@@ -406,12 +402,12 @@ udata/static/SourceSansPro-SemiboldIt.otf,sha256=cUMUMaSCm3b5Vq4Sf0g56pj1xOszGpE
|
|
|
406
402
|
udata/static/SourceSansPro-SemiboldIt.otf.woff,sha256=c_voca1ZChq-KM1MjPiaYfgda_bqvy5rZaprgoUokgI,69048
|
|
407
403
|
udata/static/SourceSansPro-SemiboldIt.ttf,sha256=EK3ye-6bT-g3T7TSBW-kaoHWkUtlL3o82f6EPFqCecc,114800
|
|
408
404
|
udata/static/SourceSansPro-SemiboldIt.ttf.woff2,sha256=JBtSfqRaYeoVAVQ3ynlAwX-to2RlkE3yAaVkv6-s-NA,44608
|
|
409
|
-
udata/static/admin.css,sha256=
|
|
410
|
-
udata/static/admin.css.map,sha256=
|
|
405
|
+
udata/static/admin.css,sha256=6NjjkctQrJv9lMEiD2WZczfdUwkzZES6tNe-hf-9ws4,185239
|
|
406
|
+
udata/static/admin.css.map,sha256=ugpn6Zy36BWHvHSkOhwa-GNuXNv_bFPL9ukKVcbHgfU,626560
|
|
411
407
|
udata/static/admin.js,sha256=pibxMEOZvT_r3wgxy_xxjG_7Cvl5K8dopynuSfTtY5I,1323379
|
|
412
408
|
udata/static/admin.js.map,sha256=eZi2nYg-FGClH53Kw3LdvYZ0RpgrrdyAgAhZyal_RQ4,8501170
|
|
413
|
-
udata/static/common.js,sha256
|
|
414
|
-
udata/static/common.js.map,sha256=
|
|
409
|
+
udata/static/common.js,sha256=-SljrgiTIlapiDSvp5NN3t3sRWsAUwmYSeZZQdzam4c,2252
|
|
410
|
+
udata/static/common.js.map,sha256=Jzm22-4iWRvB1NLf9Ge7ZhbAMSo6Thhp8NmjSPs58oU,14137
|
|
415
411
|
udata/static/fontawesome-webfont.eot,sha256=e_yrbbmdXPvxcFygU23ceFhUMsxfpBu9etDwCQM7KXk,165742
|
|
416
412
|
udata/static/fontawesome-webfont.svg,sha256=rWFXkmwWIrpOHQPUePFUE2hSS_xG9R5C_g2UX37zI-Q,444379
|
|
417
413
|
udata/static/fontawesome-webfont.ttf,sha256=qljzPyOaD7AvXHpsRcBD16msmgkzNYBmlOzW1O3A1qg,165548
|
|
@@ -424,8 +420,8 @@ udata/static/udata-oembed.ttf,sha256=2psJNoP_rIvZFqaOcdRAP60k9Oio4zE86Yma--B-lYE
|
|
|
424
420
|
udata/static/udata-oembed.woff,sha256=UrZ3wdzYq2loalqzDOsFHVXOmRw9dqcMuNv2JXrczoA,3296
|
|
425
421
|
udata/static/widgets.js,sha256=ZgP0e3ARPy7_PQPNmX_hF8IZaKf9isk5VhWYVJq8KZ0,13705
|
|
426
422
|
udata/static/widgets.js.map,sha256=RDaVASJDU9PjwOqGRsvp62qql8OwZ7Ccw5Q1Lo6PZGA,79828
|
|
427
|
-
udata/static/chunks/0.
|
|
428
|
-
udata/static/chunks/0.
|
|
423
|
+
udata/static/chunks/0.6f1698738c9b0618b673.js,sha256=CzZhJMnYIzsSVL3Jl8xEwpeBk_-M0gpArTKXsuWTEKc,295556
|
|
424
|
+
udata/static/chunks/0.6f1698738c9b0618b673.js.map,sha256=177evztvIIibluyDpm4LkEBH3rnbwlp_EByhp3JVB5w,1669471
|
|
429
425
|
udata/static/chunks/1.ff8196d42cab0f031d3f.js,sha256=RoTq8mBpF9zhhmu5d0W6RJEVrv45b3NnSjfKZ2HUhtk,303894
|
|
430
426
|
udata/static/chunks/1.ff8196d42cab0f031d3f.js.map,sha256=wmDYu41OXVox5j-pSTRNBX6jfse9NODaSm1WVQxEzVw,1740240
|
|
431
427
|
udata/static/chunks/10.e97ea231893dc435d6b5.js,sha256=APxVLHqIJpn5y4rgAcYe-kj2m1_YVKRcHQKYyoOhvDo,416268
|
|
@@ -436,8 +432,8 @@ udata/static/chunks/12.59f035a9438e2baf5126.js,sha256=o6krxp00FhozAq8cFIsn7SARMq
|
|
|
436
432
|
udata/static/chunks/12.59f035a9438e2baf5126.js.map,sha256=ZUBD8z2T7thgND62On62lLICfQFmbNli10Q0OoKb3k8,2441176
|
|
437
433
|
udata/static/chunks/13.91b177d7d531fd55cf5d.js,sha256=8iq8kts4z4ue0xA0CDWTHOItgtzHFEssI7PYQ6R-5hU,420344
|
|
438
434
|
udata/static/chunks/13.91b177d7d531fd55cf5d.js.map,sha256=amnIm8RZ0WAJ5ln8iPzvzjx37YyFRZjJQJkTl5nm-5U,2429638
|
|
439
|
-
udata/static/chunks/14.
|
|
440
|
-
udata/static/chunks/14.
|
|
435
|
+
udata/static/chunks/14.f4037a917d5364cb564b.js,sha256=jF8I8VCu15NSKUFYWix2PEBQgQk03mVmwS2704s7UjY,289983
|
|
436
|
+
udata/static/chunks/14.f4037a917d5364cb564b.js.map,sha256=KgqzF6ZQsNMpNmrwPXW5NNNagz0lsJD4pf2zuomh498,1634769
|
|
441
437
|
udata/static/chunks/15.92b2cef3032ea35da04a.js,sha256=mjInN76Vh4ZdaAeLt9cdDC_KzosZ09oXORoQnIDCDZQ,228520
|
|
442
438
|
udata/static/chunks/15.92b2cef3032ea35da04a.js.map,sha256=r8-Tpyg4JArOxM9tesc6kfmo9K4dMA4gKeHuJnAjQlc,1574560
|
|
443
439
|
udata/static/chunks/16.e866757bab9f6b0a3f1b.js,sha256=XZf7xlZ7qeSkCq7VWFnFk1mxpYomt1KMOji_TvjOKPc,236417
|
|
@@ -448,8 +444,8 @@ udata/static/chunks/18.ad41fb75ac4226e1f3ce.js,sha256=4KlM45mqvarK9EoOHtBSMxCrYf
|
|
|
448
444
|
udata/static/chunks/18.ad41fb75ac4226e1f3ce.js.map,sha256=gY6K7PmVSGRKhJdspBZcvf50HD6sVue6zIhIE0BcTAw,273610
|
|
449
445
|
udata/static/chunks/19.619b83ac597516dcd03e.js,sha256=BYAGmQGlRNW0LuXr6bX1yYWLPszRJJ_p08TyTu0WSEY,203488
|
|
450
446
|
udata/static/chunks/19.619b83ac597516dcd03e.js.map,sha256=pe7LzyYPKFSm_mKzOOzkk-bwnrEmKLKAAkEISgMhMVQ,1080613
|
|
451
|
-
udata/static/chunks/2.
|
|
452
|
-
udata/static/chunks/2.
|
|
447
|
+
udata/static/chunks/2.7c89fae92899be371ed3.js,sha256=7fJ6FaMiC4jS9-FBEb-Ztev6HthUTRM-3mchsanKu3s,276330
|
|
448
|
+
udata/static/chunks/2.7c89fae92899be371ed3.js.map,sha256=BbzNfYeAAMr5-hcAq8rJJJU8JpIyn6RHlEo6pa1bM7k,1554204
|
|
453
449
|
udata/static/chunks/20.14a92e5c503f74ff40df.js,sha256=5KSbcgzviAJ3tpRfRLPy6JC3zqE50dLijdLjaf9F59s,36688
|
|
454
450
|
udata/static/chunks/20.14a92e5c503f74ff40df.js.map,sha256=H8EFVSKtwlGVIxaB94ab_VnQGpwuElM04iQR44a8c6s,218322
|
|
455
451
|
udata/static/chunks/21.ccbfce6680a2b11a5284.js,sha256=u0FZzZtvpltEbDt35xWgAJUQ2jxHX_tDK_eFShrUFhQ,35385
|
|
@@ -478,8 +474,8 @@ udata/static/chunks/33.70f8e7b1964892a24e67.js,sha256=CP8Hb0M4O6jXd5s8_TI1BhyKB4
|
|
|
478
474
|
udata/static/chunks/33.70f8e7b1964892a24e67.js.map,sha256=0ejAXya7tMgkLGrybenkpOBCp5PpkIOy_WexGpcFu5k,709305
|
|
479
475
|
udata/static/chunks/4.95e6a070a0eb2ed08fdd.js,sha256=iYmVG0YYezPCo9myBP4N_Gqe4JGLpgpaVN7cGYhLYQQ,608399
|
|
480
476
|
udata/static/chunks/4.95e6a070a0eb2ed08fdd.js.map,sha256=pjkKpbqGpGS0sTdZScl66M9D9SUyYoRrcJ6up5C4ww4,3720482
|
|
481
|
-
udata/static/chunks/5.
|
|
482
|
-
udata/static/chunks/5.
|
|
477
|
+
udata/static/chunks/5.3dc97ea195d251881552.js,sha256=MZpC6BoP76jfcGLxsTov33jUUSq2DipJex4P2ZIyWUc,578639
|
|
478
|
+
udata/static/chunks/5.3dc97ea195d251881552.js.map,sha256=18R3tuLoQr0A4J4z-VYFAk28Wkaj8hQJBI1kl4u5LnQ,3583218
|
|
483
479
|
udata/static/chunks/6.f84539bd4c419b36cc19.js,sha256=jpjwKBv1jqOKwFqxF1mr5qUBDvmTCfRhKhqWfgRjnKM,609115
|
|
484
480
|
udata/static/chunks/6.f84539bd4c419b36cc19.js.map,sha256=0jcpGDle1aCYri5HDzgl_N1mzOxgakJ1KNBmiW4X6jU,3780096
|
|
485
481
|
udata/static/chunks/7.11ac4de064ae59691d49.js,sha256=KjMccbvUCaMsZLrdKOYyKshY6FrJ5kyZJJ3wqPVMhJ4,152380
|
|
@@ -564,7 +560,7 @@ udata/tests/__init__.py,sha256=BezijRRI6dPPiEWWjLsJFLrhhfsTZgcctcxhVfp4j70,2332
|
|
|
564
560
|
udata/tests/es-fake-result.json,sha256=z0CX9Gs-NRj49dmtdFvw8ZKsAbMhDt97Na6JX3ucX34,3155
|
|
565
561
|
udata/tests/helpers.py,sha256=aaifyevJ1Z8CZ8htRrl8OCG5hGcaHfj0lL8iMEKds9w,6022
|
|
566
562
|
udata/tests/models.py,sha256=_V0smMb1Z6p3aZv6PorzNN-HiNt_B46Ox1fqXrTJEqk,238
|
|
567
|
-
udata/tests/plugin.py,sha256=
|
|
563
|
+
udata/tests/plugin.py,sha256=puoSIbE5vL6eum0YAeGhE2ARwxWstC6ua-rXJC9Z5fI,11044
|
|
568
564
|
udata/tests/schemas.json,sha256=szM1jDpkogfOG4xWbjIGjLgG8l9-ZyE3JKQtecJyD1E,4990
|
|
569
565
|
udata/tests/test_activity.py,sha256=spWfhueuLze0kD-pAnegiL3_Kv5io155jQuFI4sjN7I,3258
|
|
570
566
|
udata/tests/test_discussions.py,sha256=zPvKOdcTNGXrvHFp9zqjhKE2fqgUkhb_1F98egXYCL0,31036
|
|
@@ -583,22 +579,21 @@ udata/tests/test_topics.py,sha256=r7Y0BW0Z5obld9ASs2Ck9AhykgBtmMedZmL2Bfz_rDw,13
|
|
|
583
579
|
udata/tests/test_transfer.py,sha256=Y0adyR3CswK2Vvao7DgpP_19b8K6XwNO2dvbKlmnlD0,8036
|
|
584
580
|
udata/tests/test_uris.py,sha256=FQJvz7RXkr21tZ7rZp2uwgZUHk88PxhYId-jXSAl9GM,8519
|
|
585
581
|
udata/tests/test_utils.py,sha256=5awzhJlbnLga0mRXNR2mBGW_kGuAIoQLEZEMQRKuaIM,7944
|
|
586
|
-
udata/tests/api/__init__.py,sha256=
|
|
582
|
+
udata/tests/api/__init__.py,sha256=Tz_WigHLDlnJNKOKzEAnJswkKiLtHlIpCE54-wgocgM,957
|
|
587
583
|
udata/tests/api/test_auth_api.py,sha256=3Zhn2A29poZIcCJ_R9_-LkR3xOFUTw1aTquiZVXQ2F0,20306
|
|
588
584
|
udata/tests/api/test_base_api.py,sha256=DRX5nuFIj51GFmMIAxUzoW1yiq1apNgr1vS4U4agzeg,2319
|
|
589
585
|
udata/tests/api/test_contact_points.py,sha256=MJm8B06iaUqIZCqxll3NViFwUCxwqZZ4u9e9s1h8MgU,1056
|
|
590
|
-
udata/tests/api/test_dataservices_api.py,sha256=eIo0b18BSSRocyf9pTChzDnKotxxLMq8R1tX53JdH_M,9743
|
|
591
586
|
udata/tests/api/test_datasets_api.py,sha256=zqRtC61NvYUNum4kBTjA1W87JAIobA4k564rm-U6c98,81704
|
|
592
587
|
udata/tests/api/test_fields.py,sha256=OW85Z5MES5HeWOpapeem8OvR1cIcrqW-xMWpdZO4LZ8,1033
|
|
593
588
|
udata/tests/api/test_follow_api.py,sha256=0h54P_Dfbo07u6tg0Rbai1WWgWb19ZLN2HGv4oLCWfg,3383
|
|
594
589
|
udata/tests/api/test_me_api.py,sha256=8OthqVYQKZrFoGuJ7zAvoLJx1IclPNzPdD5Tnzmh3rM,14163
|
|
595
|
-
udata/tests/api/test_organizations_api.py,sha256=
|
|
590
|
+
udata/tests/api/test_organizations_api.py,sha256=HxeTqP14wlWGaQt4fpQljuRy98HWnmL1QelcxbJDmV0,32704
|
|
596
591
|
udata/tests/api/test_reuses_api.py,sha256=GSoZ6SBRdMg6o0xKSQWtCSfvzqz_vZxERU567Rq1_GY,17009
|
|
597
592
|
udata/tests/api/test_swagger.py,sha256=tLg452rCD5Q0AgFXOVZKMM6jGiWwC5diX5PxbdYni0o,760
|
|
598
593
|
udata/tests/api/test_tags_api.py,sha256=xSIx_x5gqKz6BJCXKEsTqA_CR4BF1nG5NxEyfp9dy0o,2579
|
|
599
594
|
udata/tests/api/test_topics_api.py,sha256=RItjoO7g2o2BZ34cOHJvPoSus_jIe-AYHFrX_iaHQ4o,9322
|
|
600
595
|
udata/tests/api/test_transfer_api.py,sha256=aGGJp79YYHQQyMAKhp7urk4eD587v3kbIy-8rJ_kk1s,2901
|
|
601
|
-
udata/tests/api/test_user_api.py,sha256=
|
|
596
|
+
udata/tests/api/test_user_api.py,sha256=NVXsn-sRrMQYbbUyJ2_I2_C3UPfzgCZv-us6RvM5VE8,13597
|
|
602
597
|
udata/tests/apiv2/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
603
598
|
udata/tests/apiv2/test_datasets.py,sha256=QDebrTdElry2yf3icjpo7FPm183U2vscHLpZrfap_3Y,18420
|
|
604
599
|
udata/tests/apiv2/test_organizations.py,sha256=CpNG8xl13rZXxTN2-JRx9ZkyI7IuQUaOsNuumUxuB3I,6704
|
|
@@ -681,9 +676,9 @@ udata/translations/pt/LC_MESSAGES/udata.mo,sha256=uttB2K8VsqzkEQG-5HfTtFms_3LtV9
|
|
|
681
676
|
udata/translations/pt/LC_MESSAGES/udata.po,sha256=8Ql1Lp7Z9KLnvp-qRxw-NhFu1p35Xj-q6Jg9JHsYhcw,43733
|
|
682
677
|
udata/translations/sr/LC_MESSAGES/udata.mo,sha256=US8beNIMPxP5h-zD_jfP1TheDDd4DdRVS5UIiY5XVZ8,28553
|
|
683
678
|
udata/translations/sr/LC_MESSAGES/udata.po,sha256=TM0yMDvKRljyOzgZZMlTX6OfpF6OC4Ngf_9Zc8n6ayA,50313
|
|
684
|
-
udata-8.0.1.dist-info/LICENSE,sha256=V8j_M8nAz8PvAOZQocyRDX7keai8UJ9skgmnwqETmdY,34520
|
|
685
|
-
udata-8.0.1.dist-info/METADATA,sha256=
|
|
686
|
-
udata-8.0.1.dist-info/WHEEL,sha256=DZajD4pwLWue70CAfc7YaxT1wLUciNBvN_TTcvXpltE,110
|
|
687
|
-
udata-8.0.1.dist-info/entry_points.txt,sha256=3SKiqVy4HUqxf6iWspgMqH8d88Htk6KoLbG1BU-UddQ,451
|
|
688
|
-
udata-8.0.1.dist-info/top_level.txt,sha256=39OCg-VWFWOq4gCKnjKNu-s3OwFlZIu_dVH8Gl6ndHw,12
|
|
689
|
-
udata-8.0.1.dist-info/RECORD,,
|
|
679
|
+
udata-8.0.1.dev28882.dist-info/LICENSE,sha256=V8j_M8nAz8PvAOZQocyRDX7keai8UJ9skgmnwqETmdY,34520
|
|
680
|
+
udata-8.0.1.dev28882.dist-info/METADATA,sha256=cEdat6StNS-anDd93aAv8DmBXGhqmqFEHjr-0fBl920,122297
|
|
681
|
+
udata-8.0.1.dev28882.dist-info/WHEEL,sha256=DZajD4pwLWue70CAfc7YaxT1wLUciNBvN_TTcvXpltE,110
|
|
682
|
+
udata-8.0.1.dev28882.dist-info/entry_points.txt,sha256=3SKiqVy4HUqxf6iWspgMqH8d88Htk6KoLbG1BU-UddQ,451
|
|
683
|
+
udata-8.0.1.dev28882.dist-info/top_level.txt,sha256=39OCg-VWFWOq4gCKnjKNu-s3OwFlZIu_dVH8Gl6ndHw,12
|
|
684
|
+
udata-8.0.1.dev28882.dist-info/RECORD,,
|
udata/api_fields.py
DELETED
|
@@ -1,254 +0,0 @@
|
|
|
1
|
-
from udata.api import api
|
|
2
|
-
import flask_restx.fields as restx_fields
|
|
3
|
-
import udata.api.fields as custom_restx_fields
|
|
4
|
-
from bson import ObjectId
|
|
5
|
-
import mongoengine
|
|
6
|
-
import mongoengine.fields as mongo_fields
|
|
7
|
-
|
|
8
|
-
from udata.mongo.errors import FieldValidationError
|
|
9
|
-
|
|
10
|
-
def convert_db_to_field(key, field, info = {}):
|
|
11
|
-
'''
|
|
12
|
-
This function maps a Mongo field to a Flask RestX field.
|
|
13
|
-
Most of the types are a simple 1-to-1 mapping except lists and references that requires
|
|
14
|
-
more work.
|
|
15
|
-
We currently only map the params that we use from Mongo to RestX (for example min_length / max_length…).
|
|
16
|
-
|
|
17
|
-
In the first part of the function we save the RestX constructor as a lambda because we need to call it with the
|
|
18
|
-
params. Since merging the params involve a litte bit of work (merging default params with read/write params and then with
|
|
19
|
-
user-supplied overrides, setting the readonly flag…), it's easier to have do this one time at the end of the function.
|
|
20
|
-
'''
|
|
21
|
-
info = { **getattr(field, '__additional_field_info__', {}), **info }
|
|
22
|
-
|
|
23
|
-
params = {}
|
|
24
|
-
params['required'] = field.required
|
|
25
|
-
|
|
26
|
-
read_params = {}
|
|
27
|
-
write_params = {}
|
|
28
|
-
|
|
29
|
-
constructor = None
|
|
30
|
-
constructor_read = None
|
|
31
|
-
constructor_write = None
|
|
32
|
-
|
|
33
|
-
if info.get('convert_to'):
|
|
34
|
-
# TODO: this is currently never used. We may remove it if the auto-conversion
|
|
35
|
-
# is always good enough.
|
|
36
|
-
return info.get('convert_to'), info.get('convert_to')
|
|
37
|
-
elif isinstance(field, mongo_fields.StringField):
|
|
38
|
-
constructor = restx_fields.String
|
|
39
|
-
params['min_length'] = field.min_length
|
|
40
|
-
params['max_length'] = field.max_length
|
|
41
|
-
elif isinstance(field, mongo_fields.FloatField):
|
|
42
|
-
constructor = restx_fields.Float
|
|
43
|
-
params['min'] = field.min # TODO min_value?
|
|
44
|
-
params['max'] = field.max
|
|
45
|
-
elif isinstance(field, mongo_fields.BooleanField):
|
|
46
|
-
constructor = restx_fields.Boolean
|
|
47
|
-
elif isinstance(field, mongo_fields.DateTimeField):
|
|
48
|
-
constructor = custom_restx_fields.ISODateTime
|
|
49
|
-
elif isinstance(field, mongo_fields.DictField):
|
|
50
|
-
constructor = restx_fields.Raw
|
|
51
|
-
elif isinstance(field, mongo_fields.ListField):
|
|
52
|
-
# For lists, we convert the inner value from Mongo to RestX then we create
|
|
53
|
-
# the `List` RestX type with this converted inner value.
|
|
54
|
-
field_read, field_write = convert_db_to_field(f"{key}.inner", field.field, info.get('inner_field_info', {}))
|
|
55
|
-
constructor_read = lambda **kwargs: restx_fields.List(field_read, **kwargs)
|
|
56
|
-
constructor_write = lambda **kwargs: restx_fields.List(field_write, **kwargs)
|
|
57
|
-
elif isinstance(field, mongo_fields.ReferenceField):
|
|
58
|
-
# For reference we accept while writing a String representing the ID of the referenced model.
|
|
59
|
-
# For reading, if the user supplied a `nested_fields` (RestX model), we use it to convert
|
|
60
|
-
# the referenced model, if not we return a String (and RestX will call the `str()` of the model
|
|
61
|
-
# when returning from an endpoint)
|
|
62
|
-
nested_fields = info.get('nested_fields')
|
|
63
|
-
if nested_fields is None:
|
|
64
|
-
# If there is no `nested_fields` convert the object to the string representation.
|
|
65
|
-
constructor_read = restx_fields.String
|
|
66
|
-
else:
|
|
67
|
-
constructor_read = lambda **kwargs: restx_fields.Nested(nested_fields, **kwargs)
|
|
68
|
-
|
|
69
|
-
write_params['description'] = "ID of the reference"
|
|
70
|
-
constructor_write = restx_fields.String
|
|
71
|
-
elif isinstance(field, mongo_fields.EmbeddedDocumentField):
|
|
72
|
-
nested_fields = info.get('nested_fields')
|
|
73
|
-
if nested_fields is None:
|
|
74
|
-
raise ValueError(f"EmbeddedDocumentField `{key}` requires a `nested_fields` param to serialize/deserialize.")
|
|
75
|
-
|
|
76
|
-
constructor = lambda **kwargs: restx_fields.Nested(nested_fields, **kwargs)
|
|
77
|
-
else:
|
|
78
|
-
raise ValueError(f"Unsupported MongoEngine field type {field.__class__.__name__}")
|
|
79
|
-
|
|
80
|
-
read_params = {**params, **read_params, **info}
|
|
81
|
-
write_params = {**params, **write_params, **info}
|
|
82
|
-
|
|
83
|
-
read = constructor_read(**read_params) if constructor_read else constructor(**read_params)
|
|
84
|
-
if write_params.get('readonly', False):
|
|
85
|
-
write = None
|
|
86
|
-
else:
|
|
87
|
-
write = constructor_write(**write_params) if constructor_write else constructor(**write_params)
|
|
88
|
-
return read, write
|
|
89
|
-
|
|
90
|
-
def generate_fields(**kwargs):
|
|
91
|
-
'''
|
|
92
|
-
This decorator will create two auto-generated attributes on the class `__read_fields__` and `__write_fields__`
|
|
93
|
-
that can be used in API endpoint inside `expect()` and `marshall_with()`.
|
|
94
|
-
'''
|
|
95
|
-
def wrapper(cls):
|
|
96
|
-
read_fields = {}
|
|
97
|
-
write_fields = {}
|
|
98
|
-
sortables = []
|
|
99
|
-
|
|
100
|
-
read_fields['id'] = restx_fields.String(required=True)
|
|
101
|
-
|
|
102
|
-
for key, field in cls._fields.items():
|
|
103
|
-
info = getattr(field, '__additional_field_info__', None)
|
|
104
|
-
if info is None: continue
|
|
105
|
-
|
|
106
|
-
if info.get('sortable', False):
|
|
107
|
-
sortables.append(key)
|
|
108
|
-
|
|
109
|
-
read, write = convert_db_to_field(key, field)
|
|
110
|
-
|
|
111
|
-
if read:
|
|
112
|
-
read_fields[key] = read
|
|
113
|
-
if write:
|
|
114
|
-
write_fields[key] = write
|
|
115
|
-
|
|
116
|
-
# The goal of this loop is to fetch all functions (getters) of the class
|
|
117
|
-
# If a function has an `__additional_field_info__` attribute it means
|
|
118
|
-
# it has been decorated with `@function_field()` and should be included
|
|
119
|
-
# in the API response.
|
|
120
|
-
for method_name in dir(cls):
|
|
121
|
-
if method_name == 'objects': continue
|
|
122
|
-
if method_name.startswith('_'): continue
|
|
123
|
-
if method_name in read_fields: continue # Do not override if the attribute is also callable like for Extras
|
|
124
|
-
|
|
125
|
-
method = getattr(cls, method_name)
|
|
126
|
-
if not callable(method): continue
|
|
127
|
-
|
|
128
|
-
info = getattr(method, '__additional_field_info__', None)
|
|
129
|
-
if info is None: continue
|
|
130
|
-
|
|
131
|
-
def make_lambda(method):
|
|
132
|
-
'''
|
|
133
|
-
Factory function to create a lambda with the correct scope.
|
|
134
|
-
If we don't have this factory function, the `method` will be the
|
|
135
|
-
last method assigned in this loop?
|
|
136
|
-
'''
|
|
137
|
-
return lambda o: method(o)
|
|
138
|
-
|
|
139
|
-
read_fields[method_name] = restx_fields.String(attribute=make_lambda(method), **{ 'readonly':True, **info })
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
cls.__read_fields__ = api.model(f"{cls.__name__} (read)", read_fields, **kwargs)
|
|
143
|
-
cls.__write_fields__ = api.model(f"{cls.__name__} (write)", write_fields, **kwargs)
|
|
144
|
-
|
|
145
|
-
mask = kwargs.pop('mask', None)
|
|
146
|
-
if mask is not None:
|
|
147
|
-
mask = 'data{{{0}}},*'.format(mask)
|
|
148
|
-
cls.__page_fields__ = api.model(f"{cls.__name__}Page", custom_restx_fields.pager(cls.__read_fields__), mask=mask, **kwargs)
|
|
149
|
-
|
|
150
|
-
# Parser for index sort/filters
|
|
151
|
-
paginable = kwargs.get('paginable', True)
|
|
152
|
-
parser = api.parser()
|
|
153
|
-
|
|
154
|
-
if paginable:
|
|
155
|
-
parser.add_argument('page', type=int, location='args', default=1, help='The page to display')
|
|
156
|
-
parser.add_argument('page_size', type=int, location='args', default=20, help='The page size')
|
|
157
|
-
|
|
158
|
-
if sortables:
|
|
159
|
-
choices = sortables + ['-' + k for k in sortables]
|
|
160
|
-
parser.add_argument('sort', type=str, location='args', choices=choices, help='The field (and direction) on which sorting apply')
|
|
161
|
-
|
|
162
|
-
cls.__index_parser__ = parser
|
|
163
|
-
def apply_sort_filters_and_pagination(base_query):
|
|
164
|
-
args = cls.__index_parser__.parse_args()
|
|
165
|
-
|
|
166
|
-
if sortables and args['sort']:
|
|
167
|
-
base_query = base_query.order_by(args['sort'])
|
|
168
|
-
|
|
169
|
-
if paginable:
|
|
170
|
-
base_query = base_query.paginate(args['page'], args['page_size'])
|
|
171
|
-
|
|
172
|
-
return base_query
|
|
173
|
-
|
|
174
|
-
cls.apply_sort_filters_and_pagination = apply_sort_filters_and_pagination
|
|
175
|
-
return cls
|
|
176
|
-
return wrapper
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
def function_field(**info):
|
|
180
|
-
def inner(func):
|
|
181
|
-
func.__additional_field_info__ = info
|
|
182
|
-
return func
|
|
183
|
-
|
|
184
|
-
return inner
|
|
185
|
-
|
|
186
|
-
def field(inner, **kwargs):
|
|
187
|
-
'''
|
|
188
|
-
Simple decorator to mark a field as visible for the API fields.
|
|
189
|
-
We can pass additional arguments that will be forward to the RestX field constructor.
|
|
190
|
-
'''
|
|
191
|
-
inner.__additional_field_info__ = kwargs
|
|
192
|
-
return inner
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
def patch(obj, request):
|
|
196
|
-
'''
|
|
197
|
-
Patch the object with the data from the request.
|
|
198
|
-
Only fields decorated with the `field()` decorator will be read (and not readonly).
|
|
199
|
-
'''
|
|
200
|
-
for key, value in request.json.items():
|
|
201
|
-
field = obj.__write_fields__.get(key)
|
|
202
|
-
if field is not None and not field.readonly:
|
|
203
|
-
model_attribute = getattr(obj.__class__, key)
|
|
204
|
-
if isinstance(model_attribute, mongoengine.fields.ListField) and isinstance(model_attribute.field, mongoengine.fields.ReferenceField):
|
|
205
|
-
# TODO `wrap_primary_key` do Mongo request, do a first pass to fetch all documents before calling it (to avoid multiple queries).
|
|
206
|
-
value = [wrap_primary_key(key, model_attribute.field, id) for id in value]
|
|
207
|
-
if isinstance(model_attribute, mongoengine.fields.ReferenceField):
|
|
208
|
-
value = wrap_primary_key(key, model_attribute, value)
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
info = getattr(model_attribute, '__additional_field_info__', {})
|
|
212
|
-
|
|
213
|
-
# `check` field attribute allows to do validation from the request before setting
|
|
214
|
-
# the attribute
|
|
215
|
-
check = info.get('check', None)
|
|
216
|
-
if check is not None:
|
|
217
|
-
check(**{key: value}) # TODO add other model attributes in function parameters
|
|
218
|
-
|
|
219
|
-
setattr(obj, key, value)
|
|
220
|
-
|
|
221
|
-
return obj
|
|
222
|
-
|
|
223
|
-
def wrap_primary_key(field_name: str, foreign_field: mongoengine.fields.ReferenceField, value: str):
|
|
224
|
-
'''
|
|
225
|
-
We need to wrap the `String` inside an `ObjectId` most of the time. If the foreign ID is a `String` we need to get
|
|
226
|
-
a `DBRef` from the database.
|
|
227
|
-
|
|
228
|
-
TODO: we only check the document reference if the ID is a `String` field (not in the case of a classic `ObjectId`).
|
|
229
|
-
'''
|
|
230
|
-
document_type = foreign_field.document_type()
|
|
231
|
-
id_field_name = document_type.__class__._meta["id_field"]
|
|
232
|
-
|
|
233
|
-
id_field = getattr(document_type.__class__, id_field_name)
|
|
234
|
-
|
|
235
|
-
# Get the foreign document from MongoDB because the othewise it fails during read
|
|
236
|
-
# Also useful to get a DBRef for non ObjectId references (see below)
|
|
237
|
-
foreign_document = document_type.__class__.objects(**{id_field_name: value}).first()
|
|
238
|
-
if foreign_document is None:
|
|
239
|
-
raise FieldValidationError(field=field_name, message=f"Unknown reference '{value}'")
|
|
240
|
-
|
|
241
|
-
if isinstance(id_field, mongoengine.fields.ObjectIdField):
|
|
242
|
-
return ObjectId(value)
|
|
243
|
-
elif isinstance(id_field, mongoengine.fields.StringField):
|
|
244
|
-
# Right now I didn't find a simpler way to make mongoengine happy.
|
|
245
|
-
# For references, it expects `ObjectId`, `DBRef`, `LazyReference` or `document` but since
|
|
246
|
-
# the primary key a StringField (not an `ObjectId`) we cannot create an `ObjectId`, I didn't find
|
|
247
|
-
# a way to create a `DBRef` nor a `LazyReference` so I create a simple document with only the ID field.
|
|
248
|
-
# We could use a simple dict as follow instead:
|
|
249
|
-
# { 'id': value }
|
|
250
|
-
# … but it may be important to check before-hand that the reference point to a correct document.
|
|
251
|
-
return foreign_document.to_dbref()
|
|
252
|
-
else:
|
|
253
|
-
raise ValueError(f"Unknown ID field type {id_field.__class__} for {document_type.__class__} (ID field name is {id_field_name}, value was {value})")
|
|
254
|
-
|
|
File without changes
|
udata/core/dataservices/api.py
DELETED
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
from datetime import datetime
|
|
2
|
-
from flask import request
|
|
3
|
-
from flask_login import current_user
|
|
4
|
-
import mongoengine
|
|
5
|
-
|
|
6
|
-
from udata.api import api, API
|
|
7
|
-
from udata.api_fields import patch
|
|
8
|
-
from udata.core.dataset.permissions import OwnablePermission
|
|
9
|
-
from .models import Dataservice
|
|
10
|
-
from udata.models import db
|
|
11
|
-
|
|
12
|
-
ns = api.namespace('dataservices', 'Dataservices related operations (beta)')
|
|
13
|
-
|
|
14
|
-
@ns.route('/', endpoint='dataservices')
|
|
15
|
-
class DataservicesAPI(API):
|
|
16
|
-
'''Dataservices collection endpoint'''
|
|
17
|
-
@api.doc('list_dataservices')
|
|
18
|
-
@api.expect(Dataservice.__index_parser__)
|
|
19
|
-
@api.marshal_with(Dataservice.__page_fields__)
|
|
20
|
-
def get(self):
|
|
21
|
-
'''List or search all dataservices'''
|
|
22
|
-
query = Dataservice.objects.visible()
|
|
23
|
-
|
|
24
|
-
return Dataservice.apply_sort_filters_and_pagination(query)
|
|
25
|
-
|
|
26
|
-
@api.secure
|
|
27
|
-
@api.doc('create_dataservice', responses={400: 'Validation error'})
|
|
28
|
-
@api.expect(Dataservice.__write_fields__)
|
|
29
|
-
@api.marshal_with(Dataservice.__read_fields__, code=201)
|
|
30
|
-
def post(self):
|
|
31
|
-
dataservice = patch(Dataservice(), request)
|
|
32
|
-
if not dataservice.owner and not dataservice.organization:
|
|
33
|
-
dataservice.owner = current_user._get_current_object()
|
|
34
|
-
|
|
35
|
-
try:
|
|
36
|
-
dataservice.save()
|
|
37
|
-
except mongoengine.errors.ValidationError as e:
|
|
38
|
-
api.abort(400, e.message)
|
|
39
|
-
|
|
40
|
-
return dataservice, 201
|
|
41
|
-
|
|
42
|
-
@ns.route('/<dataservice:dataservice>/', endpoint='dataservice')
|
|
43
|
-
class DataserviceAPI(API):
|
|
44
|
-
@api.doc('get_dataservice')
|
|
45
|
-
@api.marshal_with(Dataservice.__read_fields__)
|
|
46
|
-
def get(self, dataservice):
|
|
47
|
-
if dataservice.deleted_at and not OwnablePermission(dataservice).can():
|
|
48
|
-
api.abort(410, 'Dataservice has been deleted')
|
|
49
|
-
return dataservice
|
|
50
|
-
|
|
51
|
-
@api.secure
|
|
52
|
-
@api.doc('update_dataservice', responses={400: 'Validation error'})
|
|
53
|
-
@api.expect(Dataservice.__write_fields__)
|
|
54
|
-
@api.marshal_with(Dataservice.__read_fields__)
|
|
55
|
-
def patch(self, dataservice):
|
|
56
|
-
if dataservice.deleted_at:
|
|
57
|
-
api.abort(410, 'dataservice has been deleted')
|
|
58
|
-
|
|
59
|
-
OwnablePermission(dataservice).test()
|
|
60
|
-
|
|
61
|
-
patch(dataservice, request)
|
|
62
|
-
dataservice.modified_at = datetime.utcnow()
|
|
63
|
-
|
|
64
|
-
try:
|
|
65
|
-
dataservice.save()
|
|
66
|
-
return dataservice
|
|
67
|
-
except mongoengine.errors.ValidationError as e:
|
|
68
|
-
api.abort(400, e.message)
|
|
69
|
-
|
|
70
|
-
@api.secure
|
|
71
|
-
@api.doc('delete_dataservice')
|
|
72
|
-
@api.response(204, 'dataservice deleted')
|
|
73
|
-
def delete(self, dataservice):
|
|
74
|
-
if dataservice.deleted_at:
|
|
75
|
-
api.abort(410, 'dataservice has been deleted')
|
|
76
|
-
|
|
77
|
-
OwnablePermission(dataservice).test()
|
|
78
|
-
|
|
79
|
-
dataservice.deleted_at = datetime.utcnow()
|
|
80
|
-
dataservice.modified_at = datetime.utcnow()
|
|
81
|
-
dataservice.save()
|
|
82
|
-
|
|
83
|
-
return '', 204
|
|
84
|
-
|