django-unfold 0.20.5__py3-none-any.whl → 0.21.0__py3-none-any.whl

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: django-unfold
3
- Version: 0.20.5
3
+ Version: 0.21.0
4
4
  Summary: Modern Django admin theme for seamless interface development
5
5
  Home-page: https://unfoldadmin.com
6
6
  License: MIT
@@ -199,6 +199,7 @@ UNFOLD = {
199
199
  "SHOW_VIEW_ON_SITE": True, # show/hide "View on site" button, default: True
200
200
  "ENVIRONMENT": "sample_app.environment_callback",
201
201
  "DASHBOARD_CALLBACK": "sample_app.dashboard_callback",
202
+ "THEME": "dark", # Force theme: "dark" or "light". Will disable theme switcher
202
203
  "LOGIN": {
203
204
  "image": lambda request: static("sample/login-bg.jpg"),
204
205
  "redirect_after": lambda request: reverse_lazy("admin:APP_MODEL_changelist"),
@@ -927,7 +928,7 @@ The biggest benefit of Unfold components is the possibility to nest them inside
927
928
  Card Title
928
929
  {% endcomponent %}
929
930
  {% endcomponent %}
930
- {% endcompontent %}
931
+ {% endcomponent %}
931
932
  ```
932
933
 
933
934
  Below you can find a more complex example which is using multiple components and processing them based on the passed variables from the `DASHBOARD_CALLBACK`.
@@ -1,10 +1,10 @@
1
1
  unfold/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
2
  unfold/admin.py,sha256=EyxkRKXWunWhPd6RdkUqdGZprTK1HPe6_xKWsh2LenY,23449
3
3
  unfold/apps.py,sha256=LXJVMj1WIoQXjRmiz2bFtsVc9gKhdby7UQczdtjieY0,307
4
- unfold/checks.py,sha256=LtFEJZfNjgpc9_3XjKSiu_7LtG-ew55R0u8qsbWOgcM,1811
4
+ unfold/checks.py,sha256=_Y9VoDBIj_VdombQ-iyN-s9cRxkW_9vQTfHQ4yYuG-8,1672
5
5
  unfold/contrib/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
6
6
  unfold/contrib/filters/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
7
- unfold/contrib/filters/admin.py,sha256=642d-pYCblJc0d0e9sxV_NHwrVZdQPYVJ1nESPH4xLE,16604
7
+ unfold/contrib/filters/admin.py,sha256=7FJl86b407ylTjgkRN2EwXGHnnVNwBiGvA1_822L5uc,16412
8
8
  unfold/contrib/filters/apps.py,sha256=avtQUAuM3EfLEa-Cb4jWUE0j0nEQtwpncw2iWX9Ivxg,107
9
9
  unfold/contrib/filters/forms.py,sha256=-Tv1vWh-u8eLPAJqSX6c8R3IY0GmgOoFrzVQ8E8gO_s,4055
10
10
  unfold/contrib/filters/static/unfold/filters/css/nouislider.min.css,sha256=rddL_jOGGVEY6wR-aw0VYovAfz5fPeAIsulrlSNb1hc,4221
@@ -19,9 +19,9 @@ unfold/contrib/filters/templates/unfold/filters/filters_numeric_single.html,sha2
19
19
  unfold/contrib/filters/templates/unfold/filters/filters_numeric_slider.html,sha256=LqN3D483HbeT33SI4Uoy8YxKLP0uWbKyt8_bi1EWz3w,1681
20
20
  unfold/contrib/forms/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
21
21
  unfold/contrib/forms/apps.py,sha256=-hrTUoIggwHQ0rL0J8l1w5KT9a3T-V5hX0OPuYDsNcY,105
22
- unfold/contrib/forms/static/unfold/forms/css/trix.css,sha256=T59JuOeW7TcSL1aq1zkXq2OA39BCrjqYb5fuvjc_Gew,20007
22
+ unfold/contrib/forms/static/unfold/forms/css/trix.css,sha256=TH9WdnaZrmwI8hAEydwjobdrBzSw_KYdRTSQDuD-8hE,20027
23
23
  unfold/contrib/forms/static/unfold/forms/js/trix.config.js,sha256=spkNBlJVk_pqido_rM6yywQxkJ3Kqb7DMLiBgpKksdA,858
24
- unfold/contrib/forms/static/unfold/forms/js/trix.js,sha256=0tRM-QGKIGPA83Z5zCyCo5NZ-QC_mTgVt4ArbGGHRsc,172634
24
+ unfold/contrib/forms/static/unfold/forms/js/trix.js,sha256=_a-jxbDmxRGNk-JyEa7ouez_frUt6-RfwnpOoSaYNOY,174198
25
25
  unfold/contrib/forms/templates/unfold/forms/helpers/toolbar.html,sha256=yS8Zy-UrzvZ5RUYwdprQzREffnYq0NlIbXBfZM2UB04,9700
26
26
  unfold/contrib/forms/templates/unfold/forms/wysiwyg.html,sha256=4ZefV6XrjJlUczcuSw8BhvMJUFSZPSXo1IkgkBivh5g,351
27
27
  unfold/contrib/forms/widgets.py,sha256=_81_fsvK-yEsFIqLU59BTIIs2KAJk61pLs7J9sNi1G0,962
@@ -60,8 +60,8 @@ unfold/decorators.py,sha256=BVDlxhZxB4ND3f5-5oiENRTv_W_Q_Eu-gZlsrYKOxiU,3272
60
60
  unfold/exceptions.py,sha256=gcCj1ox61E137bk_0Cqy4YC3SttdPgB-fiJUqpmyHSE,43
61
61
  unfold/forms.py,sha256=PTXH_CaWwVKpHw0ODEYgL8zC77n8aPja2_6v6N5QnFI,3360
62
62
  unfold/settings.py,sha256=--TdTSWdOA8TQGW4-vjJkjy_zEyd_kZwBr3BIuQ8hzI,1208
63
- unfold/sites.py,sha256=vuuDLynFSs-6AUSLQCWkD-x-RWYb8XYbKgVcrtzrxB8,12486
64
- unfold/static/unfold/css/styles.css,sha256=zW8sjzDCfcoSuH3nfMPTfg47_JdnHR89tzkLjklDpHg,90382
63
+ unfold/sites.py,sha256=yLzs9rbZV8ml-zaDkw2zcAjjTRI0sDzv4qkH3OqxghM,12556
64
+ unfold/static/unfold/css/styles.css,sha256=96Z-KIDuSuAQ765_j2hEZdsbGdseLMKZwrk4XMFyIEA,90528
65
65
  unfold/static/unfold/fonts/inter/Inter-Bold.woff2,sha256=O88EyjAeRPE_QEyKBKpK5wf2epUOEu8wwjj5bnhCZqE,46552
66
66
  unfold/static/unfold/fonts/inter/Inter-Medium.woff2,sha256=O88EyjAeRPE_QEyKBKpK5wf2epUOEu8wwjj5bnhCZqE,46552
67
67
  unfold/static/unfold/fonts/inter/Inter-Regular.woff2,sha256=O88EyjAeRPE_QEyKBKpK5wf2epUOEu8wwjj5bnhCZqE,46552
@@ -95,7 +95,7 @@ unfold/templates/admin/edit_inline/tabular.html,sha256=1VWpXzY9sRz95r7_ZPQoQbL-j
95
95
  unfold/templates/admin/filter.html,sha256=JAp95Mg6W2Pfdrr-gxEZld9EvgMGLj8etMdSl84l4ro,1686
96
96
  unfold/templates/admin/includes/fieldset.html,sha256=r4XjcZAOkWxHQExHZBWoCGtO3LYL0Iwkw1C55oR5V6M,2898
97
97
  unfold/templates/admin/includes/object_delete_summary.html,sha256=Nv69SCzyJHFX14iJFfodxKM0IIpQegKZH0fvKB15QJI,468
98
- unfold/templates/admin/index.html,sha256=TONue_QDQMnFybzbR0o82NzY4bbwa80HLzaiCy83qeU,681
98
+ unfold/templates/admin/index.html,sha256=pkGdKWdD3zzOvkRdELvdb15sleSpfl4eHPA14PAh7z0,684
99
99
  unfold/templates/admin/login.html,sha256=zZ1mppzvv9pNxW3O5XgU7rGsa8Oq6Kab5bofqv_FN9M,3494
100
100
  unfold/templates/admin/nav_sidebar.html,sha256=63lUhsHfrjZowplnOEq4BkGD9jlX0bVQw5VrAMJqf5M,1178
101
101
  unfold/templates/admin/object_history.html,sha256=PsbhXFd_3SCB9YkSJeHESp2VqjNlHtUW26mRtaZ-MD0,5069
@@ -126,7 +126,7 @@ unfold/templates/unfold/helpers/account_links.html,sha256=hyRaNDPKWf3mR4WsMibIi_
126
126
  unfold/templates/unfold/helpers/actions_row.html,sha256=1xd39zx38NOoKuDuxAG7PHeu5x2OTIraQGFkm15Erqg,1681
127
127
  unfold/templates/unfold/helpers/add_link.html,sha256=mIgpKrwqBO1oJ4cwPQWSX1oUHBwHJmy5-2TxUHf-1bo,808
128
128
  unfold/templates/unfold/helpers/app_list.html,sha256=52fpwCTFBwvzwDltdAa1l2hu8litwPRkSfoZfawn5hc,4434
129
- unfold/templates/unfold/helpers/app_list_default.html,sha256=dmg01K-xrlZaA8z0X4ZJNefpiU0VwarJ7Pm9YplUGAk,3280
129
+ unfold/templates/unfold/helpers/app_list_default.html,sha256=vZkw1F7oHOKReNkdHRYjhuNdA1nNdvSD4wbDmf0bnsM,4102
130
130
  unfold/templates/unfold/helpers/boolean.html,sha256=p_WOlytoXvDwta76WgcV4JSWKpBgKf4amhqmHF798F8,564
131
131
  unfold/templates/unfold/helpers/breadcrumb_item.html,sha256=k_1j57UV0WtzFFlMKaewj4NLbR_DhXI6RzCHThblZLw,234
132
132
  unfold/templates/unfold/helpers/display_header.html,sha256=E-yG9ydyb6rRIR5TT4FxekD3qokilfoOwaEaB7np8WI,433
@@ -138,7 +138,7 @@ unfold/templates/unfold/helpers/form_errors.html,sha256=EwerIJptSCWXvtAJ1IZKfEn9
138
138
  unfold/templates/unfold/helpers/form_label.html,sha256=5wKKBXVPwziV5v5fbYatpRvnvSJBDJf_7znNdE6V8IM,237
139
139
  unfold/templates/unfold/helpers/header.html,sha256=jklASqVEJRa22jxdXq_X2UZb2uYn_ywaZbI2N4nBv20,998
140
140
  unfold/templates/unfold/helpers/help_text.html,sha256=iBXw0LWfoYT5PoPLJek9ixv4SuK7hfVkjPgmv2ODW-s,146
141
- unfold/templates/unfold/helpers/history.html,sha256=gv1VOZ8NLGm6csNVH4shOzVUDVDiNVtYFg_JAjzneys,1993
141
+ unfold/templates/unfold/helpers/history.html,sha256=0_Imm7Fc1PqjjXEmHh8QEQg_qIqBZWx2BeK5o3axfvY,2017
142
142
  unfold/templates/unfold/helpers/label.html,sha256=sgFj9tYw9SjAq8p20nKOFjkC2653K8K1ryXT9dW4H8g,684
143
143
  unfold/templates/unfold/helpers/messages/error.html,sha256=mlHVdfpG2ycsKIDBJB9CZs6fM4bMGkpmJvtxHjEApjE,558
144
144
  unfold/templates/unfold/helpers/messages/errornote.html,sha256=5ChxoVYkF4jI-cw72gVHh0CRxDnG9ME_U6UQOArax2k,404
@@ -155,10 +155,10 @@ unfold/templates/unfold/helpers/submit.html,sha256=oSzq85LRLhdOlbFtFZFhYm6ucT95u
155
155
  unfold/templates/unfold/helpers/tab_action.html,sha256=wanUlr_CKqSjxvKC7_moHFWK-hd7aT3KDdNATkJE2XE,337
156
156
  unfold/templates/unfold/helpers/tab_list.html,sha256=Y7BtJqyVAgMaulSBfy55-surgp7TniLwW3H8eXh54Z8,2029
157
157
  unfold/templates/unfold/helpers/theme_switch.html,sha256=skkl6fYUnYLM7fAPivHxWjnOnuQSKa-7aDxh7I8dGIg,2266
158
- unfold/templates/unfold/helpers/userlinks.html,sha256=1t-lALXVUT3GvOUJSVbQjQL-QgQsCyVxFzBwjnGpdf4,575
158
+ unfold/templates/unfold/helpers/userlinks.html,sha256=qWjtBt9Q_tU8a874ii0Qqg8t_d-SSYBTB_3QZfNlx9g,634
159
159
  unfold/templates/unfold/helpers/welcomemsg.html,sha256=noRysgSENef4_53pXaTiBCy2or6lQm1ZtmCQVODAB1c,1120
160
160
  unfold/templates/unfold/layouts/base_simple.html,sha256=PHUuMVBToK9yWpdHBSWIfhdC_NEDPZTF_Ft9iDKfIEQ,985
161
- unfold/templates/unfold/layouts/skeleton.html,sha256=TlC--ywSLF6_lxIQR4UdHnHxtqEH5bDBtVnMqNCrhyQ,3224
161
+ unfold/templates/unfold/layouts/skeleton.html,sha256=D35u-G6-h5SwTMzIZaEURedsPObSjoB198lLsJwmZWs,3278
162
162
  unfold/templates/unfold/widgets/clearable_file_input_small.html,sha256=rqUnHF4jwL8_RySUuq2aXgj-0P_usgo1HeVT_IcfyFY,2531
163
163
  unfold/templates/unfold/widgets/date.html,sha256=Dq9s-Kyfkw7p4TfchR-XFVOX6pOS7GkXPOWuP9CLRVw,106
164
164
  unfold/templates/unfold/widgets/range.html,sha256=28FBtSUgUcG82vpk_I27Lbs5oWZOV_oMzVhx4wj3-Ik,262
@@ -173,7 +173,7 @@ unfold/typing.py,sha256=1P8PWM2oeaceUJtA5j071RbKEBpHYaux441u7Hd6wv4,643
173
173
  unfold/utils.py,sha256=5OIgDcwvIJQbwbnnqHx61cHh-2T1h184mTAuNq5WXLI,4088
174
174
  unfold/views.py,sha256=Ml3XlEoHLcbEWof59Dw8ihKBMcmp-gBAibThtBFj55A,708
175
175
  unfold/widgets.py,sha256=FThowQCfPVmsFT260j0ufGwPBNxF6JCIEp6QvJ-L0yI,13720
176
- django_unfold-0.20.5.dist-info/LICENSE.md,sha256=D2dAcLArwGySIf62-9y-8Q4pcJOiWj8lLpBxYPzDCBc,1069
177
- django_unfold-0.20.5.dist-info/METADATA,sha256=73XjQUtIE1eGz8gzQ6E8WsGz0GdjY3RtnJbhfbVh9Ec,40630
178
- django_unfold-0.20.5.dist-info/WHEEL,sha256=FMvqSimYX_P7y0a7UY-_Mc83r5zkBZsCYPm7Lr0Bsq4,88
179
- django_unfold-0.20.5.dist-info/RECORD,,
176
+ django_unfold-0.21.0.dist-info/LICENSE.md,sha256=D2dAcLArwGySIf62-9y-8Q4pcJOiWj8lLpBxYPzDCBc,1069
177
+ django_unfold-0.21.0.dist-info/METADATA,sha256=hoRRiJjb_1ds6xTSmBt7HluhYf8xUt-ALJskCM-j37c,40712
178
+ django_unfold-0.21.0.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
179
+ django_unfold-0.21.0.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: poetry-core 1.8.1
2
+ Generator: poetry-core 1.9.0
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
unfold/checks.py CHANGED
@@ -34,11 +34,7 @@ class UnfoldModelAdminChecks(ModelAdminChecks):
34
34
  if not hasattr(obj, method_name):
35
35
  errors.append(
36
36
  checks.Error(
37
- "{} must define a {}() method for the {} action.".format(
38
- obj.__class__.__name__,
39
- method_name,
40
- action.method.__name__,
41
- ),
37
+ f"{obj.__class__.__name__} must define a {method_name}() method for the {action.method.__name__} action.",
42
38
  obj=obj.__class__,
43
39
  id="admin.E129",
44
40
  )
@@ -45,9 +45,7 @@ class SingleNumericFilter(admin.FieldListFilter):
45
45
 
46
46
  if not isinstance(field, (DecimalField, IntegerField, FloatField, AutoField)):
47
47
  raise TypeError(
48
- "Class {} is not supported for {}.".format(
49
- type(self.field), self.__class__.__name__
50
- )
48
+ f"Class {type(self.field)} is not supported for {self.__class__.__name__}."
51
49
  )
52
50
 
53
51
  self.request = request
@@ -196,9 +194,7 @@ class RangeNumericFilter(RangeNumericMixin, admin.FieldListFilter):
196
194
  super().__init__(field, request, params, model, model_admin, field_path)
197
195
  if not isinstance(field, (DecimalField, IntegerField, FloatField, AutoField)):
198
196
  raise TypeError(
199
- "Class {} is not supported for {}.".format(
200
- type(self.field), self.__class__.__name__
201
- )
197
+ f"Class {type(self.field)} is not supported for {self.__class__.__name__}."
202
198
  )
203
199
 
204
200
  self.request = request
@@ -299,9 +295,7 @@ class RangeDateFilter(admin.FieldListFilter):
299
295
  super().__init__(field, request, params, model, model_admin, field_path)
300
296
  if not isinstance(field, DateField):
301
297
  raise TypeError(
302
- "Class {} is not supported for {}.".format(
303
- type(self.field), self.__class__.__name__
304
- )
298
+ f"Class {type(self.field)} is not supported for {self.__class__.__name__}."
305
299
  )
306
300
 
307
301
  self.request = request
@@ -394,9 +388,7 @@ class RangeDateTimeFilter(admin.FieldListFilter):
394
388
  super().__init__(field, request, params, model, model_admin, field_path)
395
389
  if not isinstance(field, DateTimeField):
396
390
  raise TypeError(
397
- "Class {} is not supported for {}.".format(
398
- type(self.field), self.__class__.__name__
399
- )
391
+ f"Class {type(self.field)} is not supported for {self.__class__.__name__}."
400
392
  )
401
393
 
402
394
  self.request = request
@@ -24,13 +24,13 @@ trix-toolbar .trix-button-group {
24
24
  border-radius: 3px; }
25
25
  trix-toolbar .trix-button-group:not(:first-child) {
26
26
  margin-left: 1.5vw; }
27
- @media (max-device-width: 768px) {
27
+ @media (max-width: 768px) {
28
28
  trix-toolbar .trix-button-group:not(:first-child) {
29
29
  margin-left: 0; } }
30
30
 
31
31
  trix-toolbar .trix-button-group-spacer {
32
32
  flex-grow: 1; }
33
- @media (max-device-width: 768px) {
33
+ @media (max-width: 768px) {
34
34
  trix-toolbar .trix-button-group-spacer {
35
35
  display: none; } }
36
36
 
@@ -57,7 +57,7 @@ trix-toolbar .trix-button {
57
57
  cursor: pointer; }
58
58
  trix-toolbar .trix-button:disabled {
59
59
  color: rgba(0, 0, 0, 0.125); }
60
- @media (max-device-width: 768px) {
60
+ @media (max-width: 768px) {
61
61
  trix-toolbar .trix-button {
62
62
  letter-spacing: -0.01em;
63
63
  padding: 0 0.3em; } }
@@ -68,7 +68,7 @@ trix-toolbar .trix-button--icon {
68
68
  height: 1.6em;
69
69
  max-width: calc(0.8em + 4vw);
70
70
  text-indent: -9999px; }
71
- @media (max-device-width: 768px) {
71
+ @media (max-width: 768px) {
72
72
  trix-toolbar .trix-button--icon {
73
73
  height: 2em;
74
74
  max-width: calc(0.8em + 3.5vw); } }
@@ -84,7 +84,7 @@ trix-toolbar .trix-button--icon {
84
84
  background-position: center;
85
85
  background-repeat: no-repeat;
86
86
  background-size: contain; }
87
- @media (max-device-width: 768px) {
87
+ @media (max-width: 768px) {
88
88
  trix-toolbar .trix-button--icon::before {
89
89
  right: 6%;
90
90
  left: 6%; } }
@@ -334,7 +334,9 @@ trix-editor .attachment__metadata {
334
334
  white-space: nowrap; }
335
335
 
336
336
  .trix-content {
337
- line-height: 1.5; }
337
+ line-height: 1.5;
338
+ overflow-wrap: break-word;
339
+ word-break: break-word; }
338
340
  .trix-content * {
339
341
  box-sizing: border-box;
340
342
  margin: 0;