lino 25.1.2__py3-none-any.whl → 25.1.3__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.
- lino/__init__.py +1 -1
- lino/core/renderer.py +5 -0
- lino/modlib/comments/fixtures/demo2.py +1 -1
- lino/modlib/system/choicelists.py +26 -10
- lino/modlib/uploads/utils.py +7 -10
- {lino-25.1.2.dist-info → lino-25.1.3.dist-info}/METADATA +1 -1
- {lino-25.1.2.dist-info → lino-25.1.3.dist-info}/RECORD +10 -10
- {lino-25.1.2.dist-info → lino-25.1.3.dist-info}/WHEEL +0 -0
- {lino-25.1.2.dist-info → lino-25.1.3.dist-info}/licenses/AUTHORS.rst +0 -0
- {lino-25.1.2.dist-info → lino-25.1.3.dist-info}/licenses/COPYING +0 -0
lino/__init__.py
CHANGED
lino/core/renderer.py
CHANGED
@@ -101,6 +101,11 @@ class Renderer(object):
|
|
101
101
|
not_implemented_js = None
|
102
102
|
extjs_version = None
|
103
103
|
|
104
|
+
support_dashboard_layout = False
|
105
|
+
"""Don't show dashboard items when rendering :xfile:`admin_main.html`.
|
106
|
+
|
107
|
+
"""
|
108
|
+
|
104
109
|
def __init__(self, front_end=None):
|
105
110
|
# if not isinstance(plugin, Plugin):
|
106
111
|
# raise Exception("{} is not a Plugin".format(plugin))
|
@@ -29,7 +29,7 @@ cond_comment = (
|
|
29
29
|
"<p><!--[if gte foo 123]>A conditional comment<![endif]--></p>\n<p>Hello</p>"
|
30
30
|
)
|
31
31
|
plain1 = "Some plain text."
|
32
|
-
plain2 = "Two paragraphs of plain text.\n\nThe second paragraph."
|
32
|
+
plain2 = "Two paragraphs of plain text.\n\nThe second paragraph. With an 👁 (U+1F441)."
|
33
33
|
|
34
34
|
BODIES = Cycler(
|
35
35
|
[styled, table, lorem, short_lorem, breaking, cond_comment, plain1, plain2]
|
@@ -1,5 +1,5 @@
|
|
1
1
|
# -*- coding: UTF-8 -*-
|
2
|
-
# Copyright 2011-
|
2
|
+
# Copyright 2011-2025 Rumma & Ko Ltd
|
3
3
|
# License: GNU Affero General Public License v3 (see file COPYING for details)
|
4
4
|
|
5
5
|
import datetime
|
@@ -8,11 +8,13 @@ from dateutil.rrule import SECONDLY, MINUTELY, HOURLY, DAILY, WEEKLY, MONTHLY, Y
|
|
8
8
|
|
9
9
|
from django.conf import settings
|
10
10
|
from django.db.models import Q
|
11
|
+
from django.db import models
|
11
12
|
from django.utils.translation import gettext_lazy as _
|
12
13
|
|
13
14
|
from lino.utils import isidentifier
|
14
15
|
from lino.core.choicelists import ChoiceList, Choice
|
15
16
|
from lino.core.roles import login_required, Explorer
|
17
|
+
from lino.core.fields import virtualfield
|
16
18
|
from lino.utils.dates import DateRangeValue
|
17
19
|
from lino.utils.format_date import day_and_month, fds
|
18
20
|
from lino.utils.html import mark_safe, format_html
|
@@ -233,6 +235,11 @@ class DisplayColors(ChoiceList):
|
|
233
235
|
verbose_name_plural = _("Display colors")
|
234
236
|
item_class = DisplayColor
|
235
237
|
required_roles = login_required(Explorer)
|
238
|
+
column_names = "value name text font_color"
|
239
|
+
|
240
|
+
@virtualfield(models.CharField(_("Font color")))
|
241
|
+
def font_color(cls, choice, ar):
|
242
|
+
return choice.font_color
|
236
243
|
|
237
244
|
# TODO: The combobox used to select a color should include a sample of each
|
238
245
|
# color. The following should theoretically do it, but the <span> tag gets
|
@@ -241,7 +248,9 @@ class DisplayColors(ChoiceList):
|
|
241
248
|
# def display_text(cls, bc):
|
242
249
|
# sample = f"""<span style="background-color:{bc.name};color:{bc.font_color}">(sample)</span>"""
|
243
250
|
# sample = mark_safe(sample)
|
244
|
-
#
|
251
|
+
# txt = format_html("{} {}", bc.text, sample)
|
252
|
+
# # raise Exception(f"20250118 {txt.__class__}")
|
253
|
+
# return txt
|
245
254
|
|
246
255
|
add = DisplayColors.add_item
|
247
256
|
# cssColors = 'White Silver Gray Black Red Maroon Yellow Olive Lime Green Aqua Teal Blue Navy Fuchsia Purple'
|
@@ -269,13 +278,20 @@ add("260", _("Magenta"), "magenta","white")
|
|
269
278
|
add("270", _("Violet"), "violet", "white")
|
270
279
|
|
271
280
|
# Other colors
|
272
|
-
add("300",
|
273
|
-
add("310",
|
274
|
-
add("311",
|
275
|
-
add("
|
276
|
-
add("
|
277
|
-
add("
|
278
|
-
add("
|
279
|
-
add("
|
281
|
+
add("300", _("Silver"), "silver", "black")
|
282
|
+
add("310", _("Maroon"), "maroon", "white")
|
283
|
+
add("311", _("Peru"), "peru", "white")
|
284
|
+
add("312", _("Pink"), "pink", "black")
|
285
|
+
add("320", _("Olive"), "olive", "white")
|
286
|
+
add("330", _("Aqua"), "aqua", "white")
|
287
|
+
add("340", _("Navy"), "navy", "white")
|
288
|
+
add("341", _("Aquamarine"), "aquamarine", "black")
|
289
|
+
add("342", _("DarkGreen"), "darkgreen", "white")
|
290
|
+
add("343", _("PaleGreen"), "palegreen", "black")
|
291
|
+
add("344", _("Chartreuse"), "chartreuse", "black")
|
292
|
+
add("345", _("Lime"), "lime", "black")
|
293
|
+
add("350", _("Fuchsia"), "fuchsia", "white")
|
294
|
+
add("351", _("Cyan"), "cyan", "black")
|
295
|
+
add("361", _("Purple"), "purple", "white")
|
280
296
|
|
281
297
|
# List of all named colors: https://www.w3schools.com/colors/colors_names.asp
|
lino/modlib/uploads/utils.py
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
# -*- coding: UTF-8 -*-
|
2
|
-
# Copyright 2010-
|
2
|
+
# Copyright 2010-2025 Rumma & Ko Ltd
|
3
3
|
# License: GNU Affero General Public License v3 (see file COPYING for details)
|
4
4
|
|
5
5
|
from os.path import splitext
|
@@ -8,9 +8,14 @@ from django.utils.text import format_lazy
|
|
8
8
|
from lino.api import dd, rt, _
|
9
9
|
from lino.utils import needs_update
|
10
10
|
|
11
|
-
|
11
|
+
try:
|
12
12
|
from PIL import Image # pip install Pillow
|
13
13
|
import pymupdf # pip install PyMuPDF
|
14
|
+
except ImportError:
|
15
|
+
pass
|
16
|
+
|
17
|
+
with_thumbnails = dd.get_plugin_setting('uploads', 'with_thumbnails', False)
|
18
|
+
|
14
19
|
|
15
20
|
class UploadMediaFile:
|
16
21
|
|
@@ -103,11 +108,3 @@ if with_thumbnails:
|
|
103
108
|
previewer = FilePreviewer("thumbs", 720)
|
104
109
|
else:
|
105
110
|
previewer = Previewer()
|
106
|
-
|
107
|
-
# full = Previewer()
|
108
|
-
# if with_thumbnails:
|
109
|
-
# small = FilePreviewer("thumbs", 720)
|
110
|
-
# else:
|
111
|
-
# small = full
|
112
|
-
|
113
|
-
# Lino currently offers only two previewers, "full" and "small"
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: lino
|
3
|
-
Version: 25.1.
|
3
|
+
Version: 25.1.3
|
4
4
|
Summary: A framework for writing desktop-like web applications using Django and ExtJS or React
|
5
5
|
Project-URL: Homepage, https://www.lino-framework.org
|
6
6
|
Project-URL: Repository, https://gitlab.com/lino-framework/lino
|
@@ -1,6 +1,6 @@
|
|
1
1
|
lino/.cvsignore,sha256=1vrrWoP-WD8hPfCszHHIiJEi8KUMRCt5WvoKB9TSB1k,28
|
2
2
|
lino/SciTEDirectory.properties,sha256=rCYi_e-6h8Yx5DwXhAa6MBPlVINcl6Vv9BQDYZV2_go,28
|
3
|
-
lino/__init__.py,sha256=
|
3
|
+
lino/__init__.py,sha256=eVK8Gig7mM7P3h6tu-4vlJJZfxRPM3rYL8q6QMl-mss,5584
|
4
4
|
lino/ad.py,sha256=AQ-vJ4scac1mx3xegXezxnxyOQpV-a0q3VFMJSDbj2s,142
|
5
5
|
lino/apps.py,sha256=ECq-dPARDkuhngwNrcipse3b4Irj70HxJs44uWEZFc4,27
|
6
6
|
lino/hello.py,sha256=7-PJg7PnEiznyETqGjOwXcKh8rda0qLetpbS2gvRYy0,532
|
@@ -55,7 +55,7 @@ lino/core/merge.py,sha256=sKtTeZtHdoDKerdHj4NXuXXNzpKDsfdPaiq-CY0NqQc,9094
|
|
55
55
|
lino/core/model.py,sha256=MNTlg53WbKXPIne5wOHtO5V3nLdxoYTBMosz9JdFQJU,36386
|
56
56
|
lino/core/permissions.py,sha256=Fnemz3NwWz21X0YATI9Q7ba2FcAdg-EMLHjIcbt_AVU,6840
|
57
57
|
lino/core/plugin.py,sha256=oVvTsGoBBYmjvRgtyiFPIiHZQErH0ZlNjiUFtOk2dOM,6834
|
58
|
-
lino/core/renderer.py,sha256=
|
58
|
+
lino/core/renderer.py,sha256=jIXxNSpljZhb9tBMhUfDNbZD3XmxYzaS6SlipHx29L4,47291
|
59
59
|
lino/core/requests.py,sha256=6CJumCg4Ds4k7XNPTEdDJOZHOKhVyyqmNxAZkduLau8,92542
|
60
60
|
lino/core/roles.py,sha256=PXwk436xUupxdbJcygRSYFu7ixfKjAJPQRUQ8sy0lB0,4425
|
61
61
|
lino/core/signals.py,sha256=0JT89mkjSbRm57QZcSI9DoThoKUGkyi-egNhuLUKEds,948
|
@@ -180,7 +180,7 @@ lino/modlib/comments/roles.py,sha256=z3gctvlTa_5PAs-D4pounyzNyuEc31jTFq9g33r6Z1w
|
|
180
180
|
lino/modlib/comments/ui.py,sha256=w72vOmK8fn6H13t2aPS7ydYU1fCsbbMH2-TSNWt3pwA,9799
|
181
181
|
lino/modlib/comments/config/comments/comments.js,sha256=7oAnNyx_MKM1iWPu-QSp6iKfnOVdgq7EciQPpxTvYU8,242
|
182
182
|
lino/modlib/comments/fixtures/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
183
|
-
lino/modlib/comments/fixtures/demo2.py,sha256=
|
183
|
+
lino/modlib/comments/fixtures/demo2.py,sha256=zlNaLCyG44HvQ6kKU1emiArT2z7O1nYGiovYh9DyHmM,24396
|
184
184
|
lino/modlib/dashboard/__init__.py,sha256=_PFbmakUn8DShXyJY3EfAcuZtX5ofWnS-8dk7s1CrLw,1420
|
185
185
|
lino/modlib/dashboard/models.py,sha256=EgRNg88dmz-OlIdi1SyEuerWMsRqKIfqE2MgKL7kApw,3510
|
186
186
|
lino/modlib/dupable/__init__.py,sha256=fIQ8wj-T8ZbkjwQgW_-ankJsHLjPMepOTo32mJXNCvI,532
|
@@ -3634,7 +3634,7 @@ lino/modlib/summaries/management/commands/__init__.py,sha256=47DEQpj8HBSa-_TImW-
|
|
3634
3634
|
lino/modlib/summaries/management/commands/checksummaries.py,sha256=hNEGFcZmbGFpL_H6aKAkdhL_Gw_mE8l-C2NYHvH4Bvo,839
|
3635
3635
|
lino/modlib/system/__init__.py,sha256=cXb8cPBr3t18mXtiY_ScqscdUgd6MvSrsHebfqY-SHk,1407
|
3636
3636
|
lino/modlib/system/actions.py,sha256=jmSYPQDvIQxDth8MaJ9GpkmSCufLGWjmAjKdHAIWE48,1126
|
3637
|
-
lino/modlib/system/choicelists.py,sha256=
|
3637
|
+
lino/modlib/system/choicelists.py,sha256=JRv_NQ6xHMFFNBkoGgu53CBLmAI3bBShzEc0JmGo61U,9534
|
3638
3638
|
lino/modlib/system/mixins.py,sha256=fpj0O1218KgwGhRr8IHYRBXsNt5uXN87qVrx7dxvjys,19031
|
3639
3639
|
lino/modlib/system/models.py,sha256=30HT4M6o_jyYgZ5hLSRf6Inc0nuhxAsHQvLfPtvkFhM,10837
|
3640
3640
|
lino/modlib/system/fixtures/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -4397,7 +4397,7 @@ lino/modlib/uploads/mixins.py,sha256=4CSTEDU0ZBfdCV5RqV9SGc3r0rH7TlaGdB7tGGlVN-o
|
|
4397
4397
|
lino/modlib/uploads/models.py,sha256=ATLVrV1cbmUj7Kv_pLOmBz3IkKpvYBjGriv74AkjD0M,16528
|
4398
4398
|
lino/modlib/uploads/roles.py,sha256=ae0wf_vC4O6MffDx8abpjW1M2oWOp5VzOvt_ckk72Cc,191
|
4399
4399
|
lino/modlib/uploads/ui.py,sha256=Iu06xyKaTKbw2YfTgDJYWQVXuUuVAqENgnfnscViL_c,8456
|
4400
|
-
lino/modlib/uploads/utils.py,sha256=
|
4400
|
+
lino/modlib/uploads/utils.py,sha256=MQAJbI5sUe0RCXCrkxpNKUJFxHpz1bOMqKQy3QsA76o,3343
|
4401
4401
|
lino/modlib/uploads/fixtures/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
4402
4402
|
lino/modlib/uploads/fixtures/demo3.py,sha256=q0bwZrx5XtRsRlFpsa33fL0sCl7IdCYaP9E1rhCnJt4,547
|
4403
4403
|
lino/modlib/users/__init__.py,sha256=QHLCNKiRMyL14Iy2eiz7_y9fAwugnDCt4N0aKtIhFA8,3188
|
@@ -4648,8 +4648,8 @@ lino/utils/xml.py,sha256=4Z44W1e5HvTVrU8erkohgnwqY-5Cr2NHywaAJ5OgRvw,989
|
|
4648
4648
|
lino/utils/mldbc/__init__.py,sha256=QqWRlzeXaOmFfbCk-vTY3SZMn1-FCf67XnpZdd_Nim0,1134
|
4649
4649
|
lino/utils/mldbc/fields.py,sha256=tAX8G5UKigr9c6g0F3ARIjZZtg406mdaZ--PWSbiH9E,2873
|
4650
4650
|
lino/utils/mldbc/mixins.py,sha256=CkYe5jDa7xp9fJq_V8zcZf8ocxgIjUgHc9KZccvA_Yw,1945
|
4651
|
-
lino-25.1.
|
4652
|
-
lino-25.1.
|
4653
|
-
lino-25.1.
|
4654
|
-
lino-25.1.
|
4655
|
-
lino-25.1.
|
4651
|
+
lino-25.1.3.dist-info/METADATA,sha256=w5X-HBjx45X4cvs5dxXVGxbh4zw95cibk9VIxPvidzY,42534
|
4652
|
+
lino-25.1.3.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
4653
|
+
lino-25.1.3.dist-info/licenses/AUTHORS.rst,sha256=8VEm_G4HOmYEa4oi1nVoKKsdo4JanekEJCefWd2E8vk,981
|
4654
|
+
lino-25.1.3.dist-info/licenses/COPYING,sha256=DZak_2itbUtvHzD3E7GNUYSRK6jdOJ-GqncQ2weavLA,34523
|
4655
|
+
lino-25.1.3.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|