wbcore 1.59.16__py2.py3-none-any.whl → 1.60.0__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.
Files changed (104) hide show
  1. wbcore/admin.py +0 -1
  2. wbcore/configurations/configurations/apps.py +1 -0
  3. wbcore/contrib/agenda/locale/de/LC_MESSAGES/django.po +17 -18
  4. wbcore/contrib/agenda/locale/en/LC_MESSAGES/django.po +17 -17
  5. wbcore/contrib/agenda/locale/fr/LC_MESSAGES/django.po +17 -18
  6. wbcore/contrib/agenda/models/calendar_item.py +9 -0
  7. wbcore/contrib/authentication/authentication.py +1 -3
  8. wbcore/contrib/authentication/configurations.py +0 -1
  9. wbcore/contrib/authentication/locale/de/LC_MESSAGES/django.po +47 -48
  10. wbcore/contrib/authentication/locale/en/LC_MESSAGES/django.po +47 -47
  11. wbcore/contrib/authentication/locale/fr/LC_MESSAGES/django.po +47 -48
  12. wbcore/contrib/authentication/models/users.py +18 -0
  13. wbcore/contrib/color/admin.py +1 -0
  14. wbcore/contrib/color/factories.py +1 -0
  15. wbcore/contrib/content_type/__init__.py +0 -0
  16. wbcore/contrib/content_type/apps.py +5 -0
  17. wbcore/{filters/fields/content_type.py → contrib/content_type/filters.py} +18 -0
  18. wbcore/{content_type → contrib/content_type}/serializers.py +2 -2
  19. wbcore/contrib/content_type/urls.py +15 -0
  20. wbcore/contrib/directory/factories/contacts.py +1 -0
  21. wbcore/contrib/directory/locale/de/LC_MESSAGES/django.po +307 -271
  22. wbcore/contrib/directory/locale/en/LC_MESSAGES/django.po +305 -268
  23. wbcore/contrib/directory/locale/fr/LC_MESSAGES/django.po +305 -269
  24. wbcore/contrib/directory/migrations/0015_alter_emailcontact_address_and_more.py +47 -0
  25. wbcore/contrib/directory/models/contacts.py +15 -22
  26. wbcore/contrib/directory/models/entries.py +82 -2
  27. wbcore/contrib/directory/models/relationships.py +5 -9
  28. wbcore/contrib/directory/tests/test_models.py +5 -3
  29. wbcore/contrib/directory/viewsets/endpoints/__init__.py +2 -0
  30. wbcore/contrib/directory/viewsets/endpoints/entries.py +10 -0
  31. wbcore/contrib/directory/viewsets/entries.py +9 -2
  32. wbcore/contrib/documents/locale/de/LC_MESSAGES/django.po +26 -23
  33. wbcore/contrib/documents/locale/en/LC_MESSAGES/django.po +26 -22
  34. wbcore/contrib/documents/locale/fr/LC_MESSAGES/django.po +26 -23
  35. wbcore/contrib/documents/serializers/document_model_relationships.py +1 -1
  36. wbcore/contrib/documents/viewsets/documents.py +1 -1
  37. wbcore/contrib/guardian/__init__.py +0 -0
  38. wbcore/contrib/guardian/filters.py +1 -0
  39. wbcore/contrib/guardian/models/mixins.py +1 -0
  40. wbcore/contrib/guardian/tasks.py +1 -0
  41. wbcore/contrib/guardian/tests/test_model_mixins.py +1 -0
  42. wbcore/contrib/guardian/tests/test_tasks.py +1 -0
  43. wbcore/contrib/guardian/tests/test_utils.py +1 -0
  44. wbcore/contrib/guardian/tests/test_viewsets.py +1 -0
  45. wbcore/contrib/guardian/urls.py +1 -0
  46. wbcore/contrib/guardian/utils.py +1 -0
  47. wbcore/contrib/guardian/viewsets/configs/buttons.py +1 -0
  48. wbcore/contrib/guardian/viewsets/configs/endpoints.py +1 -0
  49. wbcore/contrib/guardian/viewsets/viewsets.py +1 -0
  50. wbcore/contrib/io/locale/de/LC_MESSAGES/django.po +28 -28
  51. wbcore/contrib/io/locale/en/LC_MESSAGES/django.po +28 -28
  52. wbcore/contrib/io/locale/fr/LC_MESSAGES/django.po +28 -28
  53. wbcore/contrib/notifications/dispatch.py +1 -3
  54. wbcore/contrib/notifications/locale/de/LC_MESSAGES/django.po +2 -3
  55. wbcore/contrib/notifications/locale/en/LC_MESSAGES/django.po +2 -2
  56. wbcore/contrib/notifications/locale/fr/LC_MESSAGES/django.po +2 -3
  57. wbcore/contrib/notifications/models/notification_types.py +5 -7
  58. wbcore/contrib/notifications/models/notifications.py +2 -2
  59. wbcore/contrib/notifications/models/tokens.py +2 -2
  60. wbcore/contrib/tags/filters.py +1 -1
  61. wbcore/contrib/tags/serializers.py +2 -2
  62. wbcore/contrib/workflow/locale/de/LC_MESSAGES/django.po +75 -76
  63. wbcore/contrib/workflow/locale/en/LC_MESSAGES/django.po +75 -75
  64. wbcore/contrib/workflow/locale/fr/LC_MESSAGES/django.po +75 -76
  65. wbcore/contrib/workflow/serializers/process.py +4 -4
  66. wbcore/contrib/workflow/serializers/workflow.py +1 -1
  67. wbcore/filters/__init__.py +0 -1
  68. wbcore/filters/fields/__init__.py +0 -1
  69. wbcore/frontend_user_configuration.py +3 -2
  70. wbcore/locale/de/LC_MESSAGES/django.po +159 -129
  71. wbcore/locale/en/LC_MESSAGES/django.po +158 -129
  72. wbcore/locale/fr/LC_MESSAGES/django.po +159 -129
  73. wbcore/menus/menus.py +8 -5
  74. wbcore/metadata/configs/buttons/view_config.py +4 -1
  75. wbcore/metadata/configs/display/models.py +4 -5
  76. wbcore/metadata/configs/endpoints.py +7 -5
  77. wbcore/migrations/0015_delete_genericmodel.py +16 -0
  78. wbcore/models/base.py +0 -11
  79. wbcore/release_notes/models.py +2 -4
  80. wbcore/serializers/fields/fields.py +4 -2
  81. wbcore/serializers/fields/number.py +9 -0
  82. wbcore/shares/config.py +2 -2
  83. wbcore/signals/merge.py +1 -0
  84. wbcore/test/utils.py +3 -1
  85. wbcore/tests/test_permissions/test_backend.py +1 -3
  86. wbcore/tests/test_something.py +2 -2
  87. wbcore/urls.py +5 -10
  88. wbcore/utils/models.py +73 -4
  89. wbcore/utils/views.py +54 -53
  90. wbcore/viewsets/mixins.py +1 -1
  91. wbcore/viewsets/viewsets.py +1 -1
  92. {wbcore-1.59.16.dist-info → wbcore-1.60.0.dist-info}/METADATA +1 -1
  93. {wbcore-1.59.16.dist-info → wbcore-1.60.0.dist-info}/RECORD +98 -98
  94. wbcore/content_type/filters.py +0 -20
  95. wbcore/pandas/__init__.py +0 -53
  96. wbcore/pandas/fields.py +0 -25
  97. wbcore/pandas/filterset.py +0 -9
  98. wbcore/pandas/utils.py +0 -25
  99. wbcore/pandas/views.py +0 -9
  100. /wbcore/{content_type → contrib/color}/__init__.py +0 -0
  101. /wbcore/{content_type → contrib/content_type}/admin.py +0 -0
  102. /wbcore/{content_type → contrib/content_type}/utils.py +0 -0
  103. /wbcore/{content_type → contrib/content_type}/viewsets.py +0 -0
  104. {wbcore-1.59.16.dist-info → wbcore-1.60.0.dist-info}/WHEEL +0 -0
@@ -7,7 +7,7 @@ msgid ""
7
7
  msgstr ""
8
8
  "Project-Id-Version: PACKAGE VERSION\n"
9
9
  "Report-Msgid-Bugs-To: \n"
10
- "POT-Creation-Date: 2025-05-30 12:10+0200\n"
10
+ "POT-Creation-Date: 2026-01-16 14:04+0100\n"
11
11
  "PO-Revision-Date: 2025-05-30 09:40+0000\n"
12
12
  "Language-Team: French (https://app.transifex.com/stainly/teams/171242/fr/)\n"
13
13
  "MIME-Version: 1.0\n"
@@ -32,107 +32,107 @@ msgstr ""
32
32
  msgid "Content object Provider Identifier relationships"
33
33
  msgstr ""
34
34
 
35
- #: contrib/io/models.py:161 contrib/io/models.py:187
35
+ #: contrib/io/models.py:167 contrib/io/models.py:193
36
36
  msgid "Provider"
37
37
  msgstr ""
38
38
 
39
- #: contrib/io/models.py:162
39
+ #: contrib/io/models.py:168
40
40
  msgid "Providers"
41
41
  msgstr ""
42
42
 
43
- #: contrib/io/models.py:206 contrib/io/models.py:250
43
+ #: contrib/io/models.py:212 contrib/io/models.py:256
44
44
  msgid "Data Backend"
45
45
  msgstr ""
46
46
 
47
- #: contrib/io/models.py:207
47
+ #: contrib/io/models.py:213
48
48
  msgid "Data Backends"
49
49
  msgstr ""
50
50
 
51
- #: contrib/io/models.py:257
51
+ #: contrib/io/models.py:263
52
52
  msgid "Crontab Schedule"
53
53
  msgstr ""
54
54
 
55
- #: contrib/io/models.py:258
55
+ #: contrib/io/models.py:264
56
56
  msgid ""
57
57
  "Crontab Schedule to run the task on. Set only one schedule type, leave the "
58
58
  "others null."
59
59
  msgstr ""
60
60
 
61
- #: contrib/io/models.py:299
61
+ #: contrib/io/models.py:305
62
62
  msgid "Source"
63
63
  msgstr ""
64
64
 
65
- #: contrib/io/models.py:300
65
+ #: contrib/io/models.py:306
66
66
  msgid "Sources"
67
67
  msgstr ""
68
68
 
69
- #: contrib/io/models.py:688
69
+ #: contrib/io/models.py:690
70
70
  msgid "Format of file to be exported"
71
71
  msgstr ""
72
72
 
73
- #: contrib/io/models.py:691
73
+ #: contrib/io/models.py:693
74
74
  msgid "Export job Content Type"
75
75
  msgstr ""
76
76
 
77
- #: contrib/io/models.py:694
77
+ #: contrib/io/models.py:696
78
78
  msgid "Resource path to use when exporting"
79
79
  msgstr ""
80
80
 
81
- #: contrib/io/models.py:697
81
+ #: contrib/io/models.py:699
82
82
  msgid "SQL query to be executed"
83
83
  msgstr ""
84
84
 
85
- #: contrib/io/models.py:699
85
+ #: contrib/io/models.py:701
86
86
  msgid "SQL query parameters to be used with the sql query"
87
87
  msgstr ""
88
88
 
89
- #: contrib/io/models.py:703
89
+ #: contrib/io/models.py:705
90
90
  msgid "Export Source"
91
91
  msgstr ""
92
92
 
93
- #: contrib/io/models.py:704
93
+ #: contrib/io/models.py:706
94
94
  msgid "Export Sources"
95
95
  msgstr ""
96
96
 
97
- #: contrib/io/models.py:761
97
+ #: contrib/io/models.py:766
98
98
  msgid "Your export file is available"
99
99
  msgstr ""
100
100
 
101
- #: contrib/io/models.py:762
101
+ #: contrib/io/models.py:767
102
102
  msgid ""
103
103
  "<p>The export job you requested is finished and available for one hour.</p>"
104
104
  msgstr ""
105
105
 
106
- #: contrib/io/models.py:813
106
+ #: contrib/io/models.py:822
107
107
  msgid "Import Source"
108
108
  msgstr ""
109
109
 
110
- #: contrib/io/models.py:814
110
+ #: contrib/io/models.py:823
111
111
  msgid "Import Sources"
112
112
  msgstr ""
113
113
 
114
- #: contrib/io/models.py:1022
114
+ #: contrib/io/models.py:1038
115
115
  msgid "Import Credential"
116
116
  msgstr ""
117
117
 
118
- #: contrib/io/models.py:1023
118
+ #: contrib/io/models.py:1039
119
119
  msgid "Import Credentials"
120
120
  msgstr ""
121
121
 
122
- #: contrib/io/viewset_mixins.py:240 contrib/io/viewset_mixins.py:241
123
- #: contrib/io/viewset_mixins.py:242
122
+ #: contrib/io/viewset_mixins.py:246 contrib/io/viewset_mixins.py:247
123
+ #: contrib/io/viewset_mixins.py:248
124
124
  msgid "Import"
125
125
  msgstr ""
126
126
 
127
- #: contrib/io/viewset_mixins.py:243
127
+ #: contrib/io/viewset_mixins.py:249
128
128
  msgid "Please provide a valid CSV file (Coma Separated Value)"
129
129
  msgstr ""
130
130
 
131
- #: contrib/io/viewset_mixins.py:258 contrib/io/viewset_mixins.py:259
132
- #: contrib/io/viewset_mixins.py:260
131
+ #: contrib/io/viewset_mixins.py:264 contrib/io/viewset_mixins.py:265
132
+ #: contrib/io/viewset_mixins.py:266
133
133
  msgid "Export"
134
134
  msgstr ""
135
135
 
136
- #: contrib/io/viewset_mixins.py:261
136
+ #: contrib/io/viewset_mixins.py:267
137
137
  msgid "Select the export format"
138
138
  msgstr ""
@@ -2,7 +2,6 @@ from typing import Iterable
2
2
 
3
3
  from celery import shared_task
4
4
  from django.conf import settings
5
- from django.contrib.auth import get_user_model
6
5
  from django.db import transaction
7
6
  from django.dispatch import receiver
8
7
  from django.utils import timezone
@@ -10,14 +9,13 @@ from django.utils.module_loading import import_string
10
9
  from django.utils.translation import gettext
11
10
  from rest_framework.reverse import reverse
12
11
 
12
+ from wbcore.contrib.authentication.models.users import User
13
13
  from wbcore.shares.signals import handle_widget_sharing
14
14
 
15
15
  from ...workers import Queue
16
16
  from .models import Notification, NotificationType, NotificationTypeSetting
17
17
  from .tasks import send_notification_task
18
18
 
19
- User = get_user_model()
20
-
21
19
 
22
20
  def send_notification(
23
21
  code: str,
@@ -6,12 +6,11 @@
6
6
  # Translators:
7
7
  # Kevin Decoster, 2025
8
8
  #
9
- #, fuzzy
10
9
  msgid ""
11
10
  msgstr ""
12
11
  "Project-Id-Version: PACKAGE VERSION\n"
13
12
  "Report-Msgid-Bugs-To: \n"
14
- "POT-Creation-Date: 2025-05-30 11:37+0200\n"
13
+ "POT-Creation-Date: 2026-01-16 14:04+0100\n"
15
14
  "PO-Revision-Date: 2025-05-30 09:40+0000\n"
16
15
  "Last-Translator: Kevin Decoster, 2025\n"
17
16
  "Language-Team: German (https://app.transifex.com/stainly/teams/171242/de/)\n"
@@ -21,7 +20,7 @@ msgstr ""
21
20
  "Language: de\n"
22
21
  "Plural-Forms: nplurals=2; plural=(n != 1);\n"
23
22
 
24
- #: contrib/notifications/dispatch.py:72
23
+ #: contrib/notifications/dispatch.py:82
25
24
  msgid "{} shared a widget with you"
26
25
  msgstr ""
27
26
 
@@ -7,7 +7,7 @@ msgid ""
7
7
  msgstr ""
8
8
  "Project-Id-Version: PACKAGE VERSION\n"
9
9
  "Report-Msgid-Bugs-To: \n"
10
- "POT-Creation-Date: 2025-05-30 11:37+0200\n"
10
+ "POT-Creation-Date: 2026-01-16 14:04+0100\n"
11
11
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
12
12
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13
13
  "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -16,7 +16,7 @@ msgstr ""
16
16
  "Content-Type: text/plain; charset=UTF-8\n"
17
17
  "Content-Transfer-Encoding: 8bit\n"
18
18
 
19
- #: contrib/notifications/dispatch.py:72
19
+ #: contrib/notifications/dispatch.py:82
20
20
  msgid "{} shared a widget with you"
21
21
  msgstr ""
22
22
 
@@ -3,12 +3,11 @@
3
3
  # This file is distributed under the same license as the PACKAGE package.
4
4
  # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
5
5
  #
6
- #, fuzzy
7
6
  msgid ""
8
7
  msgstr ""
9
8
  "Project-Id-Version: PACKAGE VERSION\n"
10
9
  "Report-Msgid-Bugs-To: \n"
11
- "POT-Creation-Date: 2025-05-30 11:37+0200\n"
10
+ "POT-Creation-Date: 2026-01-16 14:04+0100\n"
12
11
  "PO-Revision-Date: 2025-05-30 09:40+0000\n"
13
12
  "Language-Team: French (https://app.transifex.com/stainly/teams/171242/fr/)\n"
14
13
  "MIME-Version: 1.0\n"
@@ -17,7 +16,7 @@ msgstr ""
17
16
  "Language: fr\n"
18
17
  "Plural-Forms: nplurals=3; plural=(n == 0 || n == 1) ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;\n"
19
18
 
20
- #: contrib/notifications/dispatch.py:72
19
+ #: contrib/notifications/dispatch.py:82
21
20
  msgid "{} shared a widget with you"
22
21
  msgstr ""
23
22
 
@@ -1,12 +1,12 @@
1
1
  from contextlib import suppress
2
2
 
3
- from django.contrib.auth import get_user_model
4
3
  from django.db import models
5
4
  from django.db.models import UniqueConstraint
6
5
  from django.db.models.signals import post_save
7
6
  from django.dispatch import receiver
8
7
  from guardian.utils import get_anonymous_user
9
8
 
9
+ from wbcore.contrib.authentication.models.users import User
10
10
  from wbcore.models import WBModel
11
11
 
12
12
 
@@ -62,9 +62,7 @@ class NotificationTypeSetting(WBModel):
62
62
  notification_type = models.ForeignKey(
63
63
  to="notifications.NotificationType", related_name="user_settings", on_delete=models.CASCADE
64
64
  )
65
- user = models.ForeignKey(
66
- to=get_user_model(), related_name="wbnotification_user_settings", on_delete=models.CASCADE
67
- )
65
+ user = models.ForeignKey(to=User, related_name="wbnotification_user_settings", on_delete=models.CASCADE)
68
66
 
69
67
  enable_web = models.BooleanField(default=False)
70
68
  enable_mobile = models.BooleanField(default=False)
@@ -113,7 +111,7 @@ def post_save_notification_type(instance, **kwargs):
113
111
  anonymous_user = get_anonymous_user()
114
112
 
115
113
  objs = []
116
- for user in get_user_model().objects.filter(~models.Q(pk=anonymous_user.pk)):
114
+ for user in User.objects.filter(~models.Q(pk=anonymous_user.pk)):
117
115
  try:
118
116
  existing_setting = NotificationTypeSetting.objects.get(user=user, notification_type=instance)
119
117
  enable_web = existing_setting.enable_web if not instance.is_lock else instance.default_enable_web
@@ -142,10 +140,10 @@ def post_save_notification_type(instance, **kwargs):
142
140
  )
143
141
 
144
142
 
145
- @receiver(post_save, sender=get_user_model())
143
+ @receiver(post_save, sender=User)
146
144
  def post_save_user(sender, instance, created, raw, **kwargs):
147
145
  if created:
148
- with suppress(get_user_model().DoesNotExist):
146
+ with suppress(User.DoesNotExist):
149
147
  anonymous_user = get_anonymous_user()
150
148
  if instance.pk == anonymous_user.pk:
151
149
  return
@@ -1,12 +1,12 @@
1
1
  import urllib
2
2
  from contextlib import suppress
3
3
 
4
- from django.contrib.auth import get_user_model
5
4
  from django.core.validators import URLValidator, ValidationError
6
5
  from django.db import models
7
6
  from django.urls import Resolver404, resolve
8
7
  from django.utils.functional import cached_property
9
8
 
9
+ from wbcore.contrib.authentication.models.users import User
10
10
  from wbcore.contrib.notifications.utils import base_domain, create_notification_type
11
11
 
12
12
 
@@ -14,7 +14,7 @@ class Notification(models.Model):
14
14
  title = models.CharField(max_length=255)
15
15
  body = models.TextField(null=True, blank=True)
16
16
 
17
- user = models.ForeignKey(to=get_user_model(), related_name="notifications_notifications", on_delete=models.CASCADE)
17
+ user = models.ForeignKey(to=User, related_name="notifications_notifications", on_delete=models.CASCADE)
18
18
  notification_type = models.ForeignKey(
19
19
  to="notifications.NotificationType", related_name="notifications", on_delete=models.CASCADE
20
20
  )
@@ -1,7 +1,7 @@
1
- from django.contrib.auth import get_user_model
2
1
  from django.db import models
3
2
  from django.db.models.query import QuerySet
4
3
 
4
+ from wbcore.contrib.authentication.models.users import User
5
5
  from wbcore.contrib.notifications.models.notification_types import (
6
6
  NotificationTypeSetting,
7
7
  )
@@ -29,7 +29,7 @@ class NotificationUserToken(models.Model):
29
29
  WEB = "WEB", "Web"
30
30
  MOBILE = "MOBILE", "Mobile"
31
31
 
32
- user = models.ForeignKey(to=get_user_model(), related_name="notifications_tokens", on_delete=models.CASCADE)
32
+ user = models.ForeignKey(to=User, related_name="notifications_tokens", on_delete=models.CASCADE)
33
33
  token = models.CharField(max_length=256)
34
34
  device_type = models.CharField(max_length=16, choices=NotificationDeviceType.choices)
35
35
 
@@ -4,7 +4,7 @@ from django.contrib.contenttypes.models import ContentType
4
4
  from django.db.models import Q
5
5
 
6
6
  from wbcore import filters
7
- from wbcore.content_type.utils import (
7
+ from wbcore.contrib.content_type.utils import (
8
8
  get_ancestors_content_type,
9
9
  get_view_content_type_id,
10
10
  )
@@ -2,8 +2,8 @@ from django.contrib.contenttypes.models import ContentType
2
2
  from rest_framework.reverse import reverse
3
3
 
4
4
  from wbcore import serializers
5
- from wbcore.content_type.serializers import ContentTypeRepresentationSerializer
6
- from wbcore.content_type.utils import get_view_content_type_id
5
+ from wbcore.contrib.content_type.serializers import ContentTypeRepresentationSerializer
6
+ from wbcore.contrib.content_type.utils import get_view_content_type_id
7
7
 
8
8
  from .models import Tag, TagGroup
9
9