lino 25.7.0__py3-none-any.whl → 25.7.2__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/api/dd.py +1 -0
- lino/api/doctest.py +13 -10
- lino/core/__init__.py +0 -2
- lino/core/actions.py +24 -5
- lino/core/actors.py +22 -177
- lino/core/dashboard.py +3 -2
- lino/core/dbtables.py +1 -1
- lino/core/elems.py +1 -1
- lino/core/fields.py +3 -0
- lino/core/kernel.py +6 -0
- lino/core/layouts.py +5 -7
- lino/core/model.py +1 -0
- lino/core/plugin.py +1 -1
- lino/core/renderer.py +7 -5
- lino/core/requests.py +4 -5
- lino/core/site.py +1 -1
- lino/core/utils.py +6 -4
- lino/help_texts.py +2 -1
- lino/mixins/registrable.py +4 -2
- lino/modlib/checkdata/management/commands/checkdata.py +3 -3
- lino/modlib/extjs/views.py +7 -0
- lino/modlib/help/models.py +3 -1
- lino/modlib/linod/__init__.py +1 -1
- lino/modlib/memo/__init__.py +1 -2
- lino/modlib/office/roles.py +0 -1
- lino/modlib/printing/actions.py +2 -6
- lino/modlib/printing/choicelists.py +6 -6
- lino/modlib/printing/mixins.py +2 -2
- lino/modlib/publisher/__init__.py +21 -30
- lino/modlib/publisher/models.py +3 -1
- lino/modlib/publisher/renderer.py +2 -5
- lino/modlib/publisher/views.py +4 -11
- lino/modlib/weasyprint/__init__.py +9 -0
- lino/modlib/weasyprint/choicelists.py +14 -9
- lino/modlib/weasyprint/config/weasyprint/base.weasy.html +15 -13
- lino/utils/jsgen.py +2 -1
- {lino-25.7.0.dist-info → lino-25.7.2.dist-info}/METADATA +1 -1
- {lino-25.7.0.dist-info → lino-25.7.2.dist-info}/RECORD +42 -46
- lino/modlib/forms/__init__.py +0 -51
- lino/modlib/forms/models.py +0 -0
- lino/modlib/forms/renderer.py +0 -74
- lino/modlib/forms/views.py +0 -311
- {lino-25.7.0.dist-info → lino-25.7.2.dist-info}/WHEEL +0 -0
- {lino-25.7.0.dist-info → lino-25.7.2.dist-info}/licenses/AUTHORS.rst +0 -0
- {lino-25.7.0.dist-info → lino-25.7.2.dist-info}/licenses/COPYING +0 -0
@@ -1,14 +1,14 @@
|
|
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=odCk-YexuT5Jr0q8uV4WtTzrvQX1tAWdIVO-yZuaEYo,6176
|
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
|
7
|
-
lino/help_texts.py,sha256=
|
7
|
+
lino/help_texts.py,sha256=i-Dm3syEE7R8AZy50L5oIyG2VKXoifvLHeCwMTNJceI,92136
|
8
8
|
lino/api/__init__.py,sha256=WmzHU-rHdZ68se_nI0SmepQTGE8-cd9tPpovHRH9aag,512
|
9
9
|
lino/api/ad.py,sha256=F6SrcKPRRalHKOZ7QLwsRWGq9hhykQIeo0b85cEk9NQ,314
|
10
|
-
lino/api/dd.py,sha256=
|
11
|
-
lino/api/doctest.py,sha256=
|
10
|
+
lino/api/dd.py,sha256=w-5qIpWdXu5yXyCC4Qh4ApB3yZTn0AwdxAjEhH8PyVE,7510
|
11
|
+
lino/api/doctest.py,sha256=xyVvEuW8udXaCa699rgD_25kLWKlFejxlbuwwqzM1mQ,25244
|
12
12
|
lino/api/rt.py,sha256=OCYWhrWnMcL988MdvBLBEP8qKQJEGXQhVoam_X0sotU,1376
|
13
13
|
lino/api/selenium.py,sha256=bOu8UaNz3Q7lGVvxjmvrtYtSWn1xfI1f5MN5sVcdYr8,9383
|
14
14
|
lino/api/shell.py,sha256=epyjwEZ396TiJ0AHqhVIvzX8TBIXU8xR4UHJlYOrRhc,536
|
@@ -27,46 +27,46 @@ lino/config/plugins/eid_jslib.js,sha256=PsJdUICoGK2nR9EbRg-7drI1AoasLWT_d3RInUWH
|
|
27
27
|
lino/config/unused/403.html,sha256=ePwDIUXhz1iD8xXWWyt5xEvpcGIHU4LMnXma8x0ik1c,232
|
28
28
|
lino/config/unused/404.html,sha256=GOJrAyF6NcM69ETdSHgjff_-lvYs_-bOYhyZBem7x3I,220
|
29
29
|
lino/config/unused/500.html,sha256=aWmP37uPoMS-PJgPuBloxdx0nEreU7AvkXxsex3yVYs,544
|
30
|
-
lino/core/__init__.py,sha256=
|
31
|
-
lino/core/actions.py,sha256=
|
32
|
-
lino/core/actors.py,sha256=
|
30
|
+
lino/core/__init__.py,sha256=I4X69XK6Y1MZ8X6tC13Wmg13C3r5iTfYcFDiPJKpUdw,726
|
31
|
+
lino/core/actions.py,sha256=3lJTiTQKEArzPr-MhuPF70IlpZgPmOZBBNQncLwfOZQ,32370
|
32
|
+
lino/core/actors.py,sha256=hbbzTpP7iBjQ2Eup4JhV5zx8w64arqPpkv4RnCptyKY,72585
|
33
33
|
lino/core/atomizer.py,sha256=T2hrXJoGRy_mYfYT4fILcicpNZ1v-wMw8iF7Zqq-tNQ,13401
|
34
34
|
lino/core/boundaction.py,sha256=06NNPjCesEr-R1YQKkiuy8JKzDrMJJ948x9jczOkZqY,7850
|
35
35
|
lino/core/callbacks.py,sha256=uu1-znzxVDD-JETUebw-hYsNg_9ExQb1vfwbc7Psjro,7549
|
36
36
|
lino/core/choicelists.py,sha256=5Xu3M5ZVOis2JoNSuNiJGBHdkqCwLofUxSd19iLIlKs,36503
|
37
37
|
lino/core/classproperty.py,sha256=_E95WPAs7BWbAuFpPvoYM2ZwW_mbq3rvF7o43WsMq_8,4316
|
38
38
|
lino/core/constants.py,sha256=GwSyViDk3wClZzgbrCo6N-JYOa3LCP46FSof-iZ5RRU,5085
|
39
|
-
lino/core/dashboard.py,sha256=
|
40
|
-
lino/core/dbtables.py,sha256=
|
39
|
+
lino/core/dashboard.py,sha256=kKUoZ1P6He0By3qUOkNIPAVF1zPkXxGFgHsCOdQ8syM,6672
|
40
|
+
lino/core/dbtables.py,sha256=AqH7OGnXiup7avmFU-GQubXqVYW338tu43D5X9BCyFE,29127
|
41
41
|
lino/core/dbutils.py,sha256=_QHcWd-ajLUwt5G8uOp8d47lZQKD3VseHnqKJke18rA,263
|
42
42
|
lino/core/ddh.py,sha256=dYScxWKTOCDEgow7wJNJe812ESasmmITPK2ovraBQno,3172
|
43
43
|
lino/core/diff.py,sha256=XQ-oQQDS_v3kXd4eRP9Hwr5UCgp-TPZIPVav9ZblUno,5882
|
44
|
-
lino/core/elems.py,sha256=
|
44
|
+
lino/core/elems.py,sha256=vGAqGwWkNUG9mtQkeu-EOlqPpOHyvnI6uhHn9ivsNdw,110631
|
45
45
|
lino/core/exceptions.py,sha256=QDxDo5cllSyXQ8VWet9hGXzNadxCOmwMVrFXc6V-vpE,665
|
46
|
-
lino/core/fields.py,sha256=
|
46
|
+
lino/core/fields.py,sha256=kM6HL3e8S3tdIljXbJd1us4hjR_ZdjxbKu76Jdgd6bU,54866
|
47
47
|
lino/core/frames.py,sha256=ISxgq9zyZfqW3tDZMWdKi9Ij455lT_81qBH0xex0bfE,1161
|
48
48
|
lino/core/gfks.py,sha256=6VXn2FSIXOrwVq0stfbPevT37EWg1tg4Fn-HMNVnbmk,1970
|
49
49
|
lino/core/help.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
50
50
|
lino/core/inject.py,sha256=Qd_PGEn0yMXNYVPI0wCv1vvo2CNdlPkyoBmKZELOtGM,13422
|
51
|
-
lino/core/kernel.py,sha256=
|
51
|
+
lino/core/kernel.py,sha256=YWsw9_6RmJtJT1dlg9zaAzBbnjFRjJKHL7qGyM-lyNc,48831
|
52
52
|
lino/core/keyboard.py,sha256=W3jA6qtB5HMppoNnd_6PgIM7ZlyHilJEhBvdeZTY7Xk,1283
|
53
|
-
lino/core/layouts.py,sha256=
|
53
|
+
lino/core/layouts.py,sha256=CWhKgCEBnjn39RMFRYUklPEvvCnZrDXhtigZpGuiR8o,28176
|
54
54
|
lino/core/menus.py,sha256=oZN93iwQU4vfUCuxQzaVz2xcccN5AG6NG2wGruL74sU,10713
|
55
55
|
lino/core/merge.py,sha256=sKtTeZtHdoDKerdHj4NXuXXNzpKDsfdPaiq-CY0NqQc,9094
|
56
|
-
lino/core/model.py,sha256=
|
56
|
+
lino/core/model.py,sha256=LZE1De2sboRMqlmLycu4utuIsACSeBtG9COaj9CSeXE,37041
|
57
57
|
lino/core/permissions.py,sha256=sNReMhnjIpOZcJ79Z4k-Emp55evblExJZwH-PM-efcA,7579
|
58
|
-
lino/core/plugin.py,sha256=
|
59
|
-
lino/core/renderer.py,sha256=
|
60
|
-
lino/core/requests.py,sha256=
|
58
|
+
lino/core/plugin.py,sha256=ZuA2d1oa3Mqx_jyPIwIV68cyzawLw_grthliIo83nuM,6835
|
59
|
+
lino/core/renderer.py,sha256=HhRC_gtrapNLw2Xl-cs67YdI_NdEdJ2ULsbvs5gb2wA,48252
|
60
|
+
lino/core/requests.py,sha256=_kwmx8VAwdaPssIdsZt_GzCst67BTR7WwVv4z_KCsNo,96389
|
61
61
|
lino/core/roles.py,sha256=PXwk436xUupxdbJcygRSYFu7ixfKjAJPQRUQ8sy0lB0,4425
|
62
62
|
lino/core/signals.py,sha256=ORY2s3Krlh9n24XyHetfwbeUhCqzib6YSqWeFTTY7ps,979
|
63
|
-
lino/core/site.py,sha256=
|
63
|
+
lino/core/site.py,sha256=HidiqVqXkTi-OKvNg8tvlR_FEKYEaowZ9h3ly0Zx-Fk,83583
|
64
64
|
lino/core/store.py,sha256=lv5fNf8LPzYcO1rpS-5T-Dcw6haQrLc9aaIFO7m1ukI,46055
|
65
65
|
lino/core/tables.py,sha256=sjmVu3A8gnamxwy16n76UJy2BXgiqeNeCEbI4oGd93Q,25431
|
66
66
|
lino/core/urls.py,sha256=06QlmN1vpxjmb5snO3SPpP6lX1pMdE60bTiBiC77_vQ,2677
|
67
67
|
lino/core/user_types.py,sha256=0iSYmzr2M9v2Mn2y6hzAZeqareUT-gD7l3MfIPyG9ZI,867
|
68
68
|
lino/core/userprefs.py,sha256=cmufIS9xJErKDrw05uoWtQTUR6WRWIGkU1KdAqzNr5M,2850
|
69
|
-
lino/core/utils.py,sha256=
|
69
|
+
lino/core/utils.py,sha256=FAIJPRYFIVoyOrpc9AWwNaM4f5Z8OEgbYwGu6v4RQPA,40462
|
70
70
|
lino/core/views.py,sha256=qLjEN6GSXScbmAnKN7yDHySmsjL0h4sMKRIQCpOEdPU,7026
|
71
71
|
lino/core/widgets.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
72
72
|
lino/core/workflows.py,sha256=6DJ-sCcZ7kwUWYvArD2_j4NZBia0S3OgHySifC-NSuQ,10584
|
@@ -124,7 +124,7 @@ lino/mixins/periods.py,sha256=b2vucnjFXYalxiDlH_LsSfPwJU5tcluKfFAaLS3vTck,11519
|
|
124
124
|
lino/mixins/polymorphic.py,sha256=MLbfOeIYRoDZO4048X2oWhG5cxds2pLkwciXcw1xjVQ,9393
|
125
125
|
lino/mixins/printable.py,sha256=4U8M1lrTjUeuaPwrcWoanCBo53iAxiNpSTsVctI-gI0,199
|
126
126
|
lino/mixins/ref.py,sha256=qV8CprGCvwzzWTl6LQc9I1RwD8pziD0F7Ykoaznm8wM,5550
|
127
|
-
lino/mixins/registrable.py,sha256=
|
127
|
+
lino/mixins/registrable.py,sha256=RXNaQS76X8_vLs2c57hxQ9BcCuPWF1CBH2T3hjnB61o,7258
|
128
128
|
lino/mixins/sequenced.py,sha256=6j3slKU_nX2O0gymicNsWAcx93DfpNgg-Pe7Tzp6q24,16630
|
129
129
|
lino/modlib/__init__.py,sha256=cO31gNu2oRkp7o2v3D9gK2H7j4jF9rbVyPxPZhZQwrQ,940
|
130
130
|
lino/modlib/about/__init__.py,sha256=jhqGQIXU1o7KkmmQjfwPKJc3buibB09Fy55carAmi7U,342
|
@@ -170,7 +170,7 @@ lino/modlib/checkdata/fixtures/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5
|
|
170
170
|
lino/modlib/checkdata/fixtures/checkdata.py,sha256=LD-uIzRIDEv4v0lrPTdvpH_cLITNDF7Z1DCx-Ew_C-w,402
|
171
171
|
lino/modlib/checkdata/management/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
172
172
|
lino/modlib/checkdata/management/commands/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
173
|
-
lino/modlib/checkdata/management/commands/checkdata.py,sha256=
|
173
|
+
lino/modlib/checkdata/management/commands/checkdata.py,sha256=z-mvg8R0G7-BiWcyeyeMUoaLEhi9n58lockOtPdmhCg,1962
|
174
174
|
lino/modlib/comments/__init__.py,sha256=XoRLIB-pSsz4EfA2FhsbKQ27fsW_AAvS7SyA0_vhHv8,1678
|
175
175
|
lino/modlib/comments/choicelists.py,sha256=SIA7P_KwtaayqOJxCkwyZouK0Z23-2v4ZFV9a0Zexnk,3314
|
176
176
|
lino/modlib/comments/mixins.py,sha256=h1VvM4h-6rEixziz0r7vJCptM7T7K6i4r50Scz5riws,4413
|
@@ -189,7 +189,7 @@ lino/modlib/export_excel/__init__.py,sha256=HrsrhXjIMvMHRGu8whH3A_WijZWrH35p2cQs
|
|
189
189
|
lino/modlib/export_excel/models.py,sha256=u9COKVdVsPwGk5WjgVarjLSkxmS-KOdohXfH4CruF_c,5353
|
190
190
|
lino/modlib/extjs/__init__.py,sha256=6UBWAWSROwy3DfTXQmVUVJTF6eZ_e2k3BEfE4wtqVhU,10172
|
191
191
|
lino/modlib/extjs/ext_renderer.py,sha256=zjyZ8POSCoQMCzeaisIYJwk_OM6v0GimuRKddvyQAEM,60659
|
192
|
-
lino/modlib/extjs/views.py,sha256=
|
192
|
+
lino/modlib/extjs/views.py,sha256=krcr8oCmQUXX7wK7eP-LxTCDUL8AtqMFqbNPXY0LA5c,26964
|
193
193
|
lino/modlib/extjs/config/extjs/index.html,sha256=jO5hdNpFSkm9t0xhHD5hc8Hw1fSr6xb3zYq9aMyOI7Q,8603
|
194
194
|
lino/modlib/extjs/config/extjs/linoweb.js,sha256=I4VYGmkK4htqZvHM9g-6psJF3pp7SvgHEI0I02Sxpvo,175127
|
195
195
|
lino/modlib/extjs/config/extjs/service-worker.js,sha256=KEKWeehTlfBHk3r8NbsP9C5av_DukHORybxFOwbjYaQ,1767
|
@@ -3486,16 +3486,12 @@ lino/modlib/extjs/static/filterRow/images/grid3-hrow-over.gif,sha256=rB1ZXIZpXr2
|
|
3486
3486
|
lino/modlib/extjs/static/filterRow/images/grid3-hrow.gif,sha256=nVjC7LBaJ2voOKV0eBJxBsltnSJ3xujk_NvnRd2ObK4,853
|
3487
3487
|
lino/modlib/extjs/static/filterRow/images/grid3-hrow2-over.gif,sha256=aDLPaz9PDKsTCUntlEJaJFqL2yK6mW41CpbcStUq91g,826
|
3488
3488
|
lino/modlib/extjs/static/filterRow/images/moreOptions.png,sha256=xNWuPzMGJqzfFsY6joMNCL3OhgDA7lQumFS7Rg94Mck,6446
|
3489
|
-
lino/modlib/forms/__init__.py,sha256=mnqO1aui7njM7XjlC5Fil_1Fmiqz0szvdTer86AZeWE,1183
|
3490
|
-
lino/modlib/forms/models.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
3491
|
-
lino/modlib/forms/renderer.py,sha256=KLMAyDPLpWlRCzzQ4F4aS2bs5birR_JaFQu6lQX-ZNk,2406
|
3492
|
-
lino/modlib/forms/views.py,sha256=L8U8LKFB1bP1q2NiAcRkZvynT_uw7yb93HIwA3TaXTs,10313
|
3493
3489
|
lino/modlib/gfks/__init__.py,sha256=2f34DqbWXWUxE_y_0LqLfkpoyZ-cqQucg4xZkI2H3VY,1247
|
3494
3490
|
lino/modlib/gfks/fields.py,sha256=qVQhkSlj1pxhFEOw5QjEHty9dAtSmXakNU98vztREj8,3251
|
3495
3491
|
lino/modlib/gfks/mixins.py,sha256=BcITVETBR7zVj684diZGCii3rzm7lgrgzr2euy-D-iw,2626
|
3496
3492
|
lino/modlib/gfks/models.py,sha256=bDbuvtpSW-wxNWLC3pKWsDQPyN4g6MFMTS-66aQ2DX8,6723
|
3497
3493
|
lino/modlib/help/__init__.py,sha256=sPe4flqqGEtxefsUaPdzAti7qkmLuPD9mhKc8CA2uWs,4413
|
3498
|
-
lino/modlib/help/models.py,sha256=
|
3494
|
+
lino/modlib/help/models.py,sha256=oGY8HISu7xcZOr0UMeJQjRRg8y3x4xt-hZn41ml3Q1Y,3599
|
3499
3495
|
lino/modlib/help/utils.py,sha256=IRGHjvPZVtw16SMehxenN8cJGT8gROcYv53UFC01oZQ,4263
|
3500
3496
|
lino/modlib/help/config/makehelp/actor.tpl.rst,sha256=Yl-ZAWvI93cVFLd7GG-qpn_vkGFvKe3iR0eWBJpHgMc,346
|
3501
3497
|
lino/modlib/help/config/makehelp/actors.tpl.rst,sha256=wXMKYQnlhLi432QggVgRUWGuHRDiSX9NyXSdnSar7Io,249
|
@@ -3532,7 +3528,7 @@ lino/modlib/languages/fixtures/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5
|
|
3532
3528
|
lino/modlib/languages/fixtures/all_languages.py,sha256=311mA7tFvB33eVAZYk2B-rP0Hgf3qf01m3nGD_9nuyw,20905
|
3533
3529
|
lino/modlib/languages/fixtures/few_languages.py,sha256=nhhfS4bV9x2yvtGlWFX5j7pC40-c31bFInGvlHxmT4Y,846
|
3534
3530
|
lino/modlib/languages/fixtures/iso-639-3_20100707.tab,sha256=u8PwI2s8shy0_Val5-sa76Nll5FEtGi6_lAZevC-syY,180479
|
3535
|
-
lino/modlib/linod/__init__.py,sha256=
|
3531
|
+
lino/modlib/linod/__init__.py,sha256=zn0MW5jo1QSUoZYDxqqyAY4Ra5fMRW9NWAzdXtTyWXg,2663
|
3536
3532
|
lino/modlib/linod/choicelists.py,sha256=UqRCmjcWkj5iYj6wudEV9Be5_cpy833TC6euo8tMNfY,4826
|
3537
3533
|
lino/modlib/linod/consumers.py,sha256=XBjA1fflJ-e9yWRMKXyQAhrOklYzs5JRhEeGMOKWFqM,6730
|
3538
3534
|
lino/modlib/linod/mixins.py,sha256=PNw-YCcDtT4xQEEAU9v4nvacDp_2S_BWip2Cu3dzOnw,12027
|
@@ -3544,7 +3540,7 @@ lino/modlib/linod/fixtures/checkdata.py,sha256=JBh_r-OCd0VXSgyxegBq8fmf5T2CyeKjX
|
|
3544
3540
|
lino/modlib/linod/management/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
3545
3541
|
lino/modlib/linod/management/commands/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
3546
3542
|
lino/modlib/linod/management/commands/linod.py,sha256=SzJ6-yRpI1QFrXqiS8AO7_c2NmkMdV4JpFhfyGzs5eI,2587
|
3547
|
-
lino/modlib/memo/__init__.py,sha256=
|
3543
|
+
lino/modlib/memo/__init__.py,sha256=mM4xIODNczmmn43ympj_Un7sPyc9RuIr6zmGKYB5vkk,5381
|
3548
3544
|
lino/modlib/memo/mixins.py,sha256=gtWbmpjLEEBSB11zp30t1Kf3ukUsGXntaIjymj3Kq6k,10915
|
3549
3545
|
lino/modlib/memo/models.py,sha256=zUEvWu0dK5QhkU3DeMqNqsrzSUzOl6DLZaJBNytfgrs,4388
|
3550
3546
|
lino/modlib/memo/parser.py,sha256=h21I0EjXfV2oHvekp5LxqtfEGlHREa1eOFHU3yC3sOw,13029
|
@@ -3577,27 +3573,27 @@ lino/modlib/odata/__init__.py,sha256=k26EMnYYOaS4FoIlsOqlbhRZvBPuTjYyGPyTRfP9YaY
|
|
3577
3573
|
lino/modlib/odata/views.py,sha256=ssyYYIyGoxXtR3hKnIa-ZBPLb6vxEU5C6XUUQ1L6Z70,7205
|
3578
3574
|
lino/modlib/odata/config/odata/csdl.xml,sha256=KFDImzUA4YI6PL-i5AHnm22eBMLTw-K2iljslDJFQH8,296
|
3579
3575
|
lino/modlib/office/__init__.py,sha256=rOKD9zKt-VBvFFqoHBioNp299Igb1Sk2n466iCt6ASQ,287
|
3580
|
-
lino/modlib/office/roles.py,sha256=
|
3576
|
+
lino/modlib/office/roles.py,sha256=ZDerYusqGLP_YPFJAGNjEIHjNIvAFZ_2zfLaCuHg_7o,319
|
3581
3577
|
lino/modlib/periods/__init__.py,sha256=Y1Ug7B1LZ3GN-HyT5kiN_40dvaZHlovn5gt-qPmTHLQ,1142
|
3582
3578
|
lino/modlib/periods/choicelists.py,sha256=1DiNk8ufjLufPmX0MTi767bPngPvzh10u5EDp0lMd9I,1454
|
3583
3579
|
lino/modlib/periods/mixins.py,sha256=QQXtu1Z6HjqDlL_xMM98FR7PQGKhYgjslhusOiWwPDA,4271
|
3584
3580
|
lino/modlib/periods/models.py,sha256=VPLed_glyek0atkpVcbWKn-YWLIDI4dhJ-guBkKvdYo,9255
|
3585
3581
|
lino/modlib/periods/fixtures/std.py,sha256=aWzt-frGjzPDwQ2pCKU1nT3oE4xzm7AQ8uLTJqSnS54,741
|
3586
3582
|
lino/modlib/printing/__init__.py,sha256=u1fq44d073-IDH_t8hWs1sQdlAHdsCP85sfEOMSW5L4,689
|
3587
|
-
lino/modlib/printing/actions.py,sha256=
|
3588
|
-
lino/modlib/printing/choicelists.py,sha256=
|
3589
|
-
lino/modlib/printing/mixins.py,sha256=
|
3583
|
+
lino/modlib/printing/actions.py,sha256=gn4XqIvToXUumymDA20sl7RRsPOejCMu8dKZ3NJJKcE,11669
|
3584
|
+
lino/modlib/printing/choicelists.py,sha256=UeOVlkYsLV7gxmVWuKqgqrU5zRlYyUck_3ebKDYnqDA,9743
|
3585
|
+
lino/modlib/printing/mixins.py,sha256=1ETtco9A0Err6Vw46LnQOGEd7bSB5AzC7KCa-O7uXfE,8341
|
3590
3586
|
lino/modlib/printing/models.py,sha256=fd-BEKSLpgxPnkh9U7fg2tjNy39exBi3xJC9VzJuXdU,185
|
3591
3587
|
lino/modlib/printing/utils.py,sha256=LUO9769wJvHCPZIqeVQ9XAS6UKJ6BfJbiwO8Dt1kHc4,737
|
3592
3588
|
lino/modlib/printing/config/report/Default.odt,sha256=4X8UD9H_5Th2CELP0C6DTe4g0ZNUPXAg1C00xP3Qluc,10930
|
3593
3589
|
lino/modlib/printing/config/report/Default.wk.html,sha256=4Ssx2LWm1gVpXf0Q4XoSY15WkhqRvx51Upab-IS1nm0,96
|
3594
|
-
lino/modlib/publisher/__init__.py,sha256=
|
3590
|
+
lino/modlib/publisher/__init__.py,sha256=9w4cclyodBB3PO5rFzheIkzJs-tfA62PSGx2WI0NL5Q,2303
|
3595
3591
|
lino/modlib/publisher/choicelists.py,sha256=gVzjyp1sJ-XewAW-I_bCrKdTLgygLzh1ZwFI1rKyPdo,9070
|
3596
3592
|
lino/modlib/publisher/mixins.py,sha256=yRxAtFSNe9aVvdY-th_a5wmQ76jBfKYWzeNUn-efJMA,6651
|
3597
|
-
lino/modlib/publisher/models.py,sha256=
|
3598
|
-
lino/modlib/publisher/renderer.py,sha256=
|
3593
|
+
lino/modlib/publisher/models.py,sha256=GKM31oWJ6etzughvpQKuGN1rvHSiKneB4t6dWRBvsrA,17264
|
3594
|
+
lino/modlib/publisher/renderer.py,sha256=Rl6fX8PzfX6crmnUh8mdU5Mpe44mSN5lTu_Pv8aVSCk,1845
|
3599
3595
|
lino/modlib/publisher/ui.py,sha256=qWp3JWhO6zN_HSZvSlolmNTgiZgoJeY2_TIDh9nYf3Q,4491
|
3600
|
-
lino/modlib/publisher/views.py,sha256=
|
3596
|
+
lino/modlib/publisher/views.py,sha256=l_GomdliB1qCylg7jKKkay3ZgAaOPfWNQQ6ZPDjAUl0,2214
|
3601
3597
|
lino/modlib/publisher/config/publisher/base.html,sha256=nrWuN4lhP1O4ORdYTaY3fS2pc90yfUnfDYfm2Jtr7hQ,198
|
3602
3598
|
lino/modlib/publisher/config/publisher/default_list.pub.html,sha256=3ePc4U3xZxE-pqtzlnB9CRQWu8OQrtfXKEjyuc8BBUQ,578
|
3603
3599
|
lino/modlib/publisher/config/publisher/item.pub.html,sha256=973RYgCAYG1SYIB4bwfVZFVTUo0WD2I98PsoPgjQ8XA,154
|
@@ -4426,10 +4422,10 @@ lino/modlib/users/fixtures/demo.py,sha256=YHPhvjqAh-V9WHgFct2GQlQATZmS-W3Nry-X6m
|
|
4426
4422
|
lino/modlib/users/fixtures/demo2.py,sha256=j2ke91wvpHs3kHpeztzV3nOG4rJvavkHv2YJo0dISdI,495
|
4427
4423
|
lino/modlib/users/fixtures/demo_users.py,sha256=zTkqxi6hUBL55B9FGpilrhT0aiBXN9uEhxzu0onCF5g,744
|
4428
4424
|
lino/modlib/users/fixtures/std.py,sha256=Eo_TdqFC7NPryLeGRfp-nbOXw3hDqxTUpddFTxUuZ74,712
|
4429
|
-
lino/modlib/weasyprint/__init__.py,sha256=
|
4430
|
-
lino/modlib/weasyprint/choicelists.py,sha256=
|
4425
|
+
lino/modlib/weasyprint/__init__.py,sha256=0bKrkAQUcICXAxocT3zlJdyRBtOw7WP-wbEThMFNNHw,2525
|
4426
|
+
lino/modlib/weasyprint/choicelists.py,sha256=HiQuU2UpC0_U989MAZSCIt4Jkb3E2O3JTlT5H2UeJKE,1386
|
4431
4427
|
lino/modlib/weasyprint/models.py,sha256=op6CRRBC8NatqGgGdQHU4zcVG4fu4mRS9Mz8STG3B3g,168
|
4432
|
-
lino/modlib/weasyprint/config/weasyprint/base.weasy.html,sha256=
|
4428
|
+
lino/modlib/weasyprint/config/weasyprint/base.weasy.html,sha256=QgQBIt6guuKTLftlnNXD40LfmyBEMqHhrijp63slHA0,4620
|
4433
4429
|
lino/modlib/wkhtmltopdf/__init__.py,sha256=1nqwVpOQH4YMhegnzrcfvXW_Xy9CIdHBHzrNvDGyVxg,773
|
4434
4430
|
lino/modlib/wkhtmltopdf/choicelists.py,sha256=Mq7LySs-HJIXnyUHN5PR55nQyg2cgPjEQuN9JUhBmUY,1818
|
4435
4431
|
lino/modlib/wkhtmltopdf/models.py,sha256=T7lHSSQKNcUWceNnNzq_bKEguXQ1THK5qyCDgeV6xfM,294
|
@@ -4607,7 +4603,7 @@ lino/utils/html2xhtml.py,sha256=fvrIoLBFpiXtYO3UYaIgAIDjf6ATvrxolQX4etxS57Y,2119
|
|
4607
4603
|
lino/utils/instantiator.py,sha256=RWC0uG1XkYa7yjQfWl9rmA_g9tErjeO5mM06u-BatnE,7027
|
4608
4604
|
lino/utils/jinja.py,sha256=1FZgWNKEP9wcokFuIfYysl_VD5mwVHxBHtpnmO17nRQ,1444
|
4609
4605
|
lino/utils/jscompressor.py,sha256=j9UTaaPCfRZLrWUh6PBp0KDDM0QshG7XAFzp-R_elOs,5225
|
4610
|
-
lino/utils/jsgen.py,sha256=
|
4606
|
+
lino/utils/jsgen.py,sha256=p5BSoCYs67AgD-Q9gmeJp_uQffskT3HXYdp7SrniDsI,15252
|
4611
4607
|
lino/utils/latex.py,sha256=cv5rJjtcslTVoRNjAmlUd2CCpC0GPO-YnvJgNJJe0R8,2218
|
4612
4608
|
lino/utils/mdbtools.py,sha256=R1LHskyDLtwBcYRDA14PU2XeSku9gRUIV52f4Sr-Hto,5310
|
4613
4609
|
lino/utils/media.py,sha256=Vk-Mt-w9agYWhKHW6zqr9p6cu5uYQaeaPQU28cbgUDU,2306
|
@@ -4639,8 +4635,8 @@ lino/utils/xml.py,sha256=EGDnO1UaREst9fS7KTESdbHnrrVCwKbRQdvut6B6GmQ,1612
|
|
4639
4635
|
lino/utils/mldbc/__init__.py,sha256=QqWRlzeXaOmFfbCk-vTY3SZMn1-FCf67XnpZdd_Nim0,1134
|
4640
4636
|
lino/utils/mldbc/fields.py,sha256=tAX8G5UKigr9c6g0F3ARIjZZtg406mdaZ--PWSbiH9E,2873
|
4641
4637
|
lino/utils/mldbc/mixins.py,sha256=CkYe5jDa7xp9fJq_V8zcZf8ocxgIjUgHc9KZccvA_Yw,1945
|
4642
|
-
lino-25.7.
|
4643
|
-
lino-25.7.
|
4644
|
-
lino-25.7.
|
4645
|
-
lino-25.7.
|
4646
|
-
lino-25.7.
|
4638
|
+
lino-25.7.2.dist-info/METADATA,sha256=r02SpeYvS8PQ1F4MbZXwjctI20OpjU72PE0h51a-wfo,42534
|
4639
|
+
lino-25.7.2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
4640
|
+
lino-25.7.2.dist-info/licenses/AUTHORS.rst,sha256=8VEm_G4HOmYEa4oi1nVoKKsdo4JanekEJCefWd2E8vk,981
|
4641
|
+
lino-25.7.2.dist-info/licenses/COPYING,sha256=DZak_2itbUtvHzD3E7GNUYSRK6jdOJ-GqncQ2weavLA,34523
|
4642
|
+
lino-25.7.2.dist-info/RECORD,,
|
lino/modlib/forms/__init__.py
DELETED
@@ -1,51 +0,0 @@
|
|
1
|
-
# -*- coding: UTF-8 -*-
|
2
|
-
# Copyright 2017 Rumma & Ko Ltd
|
3
|
-
# License: GNU Affero General Public License v3 (see file COPYING for details)
|
4
|
-
"""
|
5
|
-
This started as a copy of :mod:`lino.modlib.bootstrap`.
|
6
|
-
|
7
|
-
.. autosummary::
|
8
|
-
:toctree:
|
9
|
-
|
10
|
-
views
|
11
|
-
renderer
|
12
|
-
models
|
13
|
-
"""
|
14
|
-
|
15
|
-
from lino.api.ad import Plugin
|
16
|
-
|
17
|
-
|
18
|
-
class Plugin(Plugin):
|
19
|
-
ui_handle_attr_name = "forms_handle"
|
20
|
-
|
21
|
-
needs_plugins = ["lino.modlib.jinja"]
|
22
|
-
|
23
|
-
url_prefix = "f"
|
24
|
-
|
25
|
-
def on_ui_init(self, kernel):
|
26
|
-
from .renderer import Renderer
|
27
|
-
|
28
|
-
self.renderer = Renderer(self)
|
29
|
-
# ui.bs3_renderer = self.renderer
|
30
|
-
|
31
|
-
def get_patterns(self):
|
32
|
-
from django.conf.urls import url
|
33
|
-
from . import views
|
34
|
-
|
35
|
-
rx = "^"
|
36
|
-
|
37
|
-
urls = [
|
38
|
-
url(rx + r"$", views.Index.as_view()),
|
39
|
-
url(rx + r"auth", views.Authenticate.as_view()),
|
40
|
-
url(rx + r"(?P<app_label>\w+)/(?P<actor>\w+)$", views.List.as_view()),
|
41
|
-
url(
|
42
|
-
rx + r"(?P<app_label>\w+)/(?P<actor>\w+)/(?P<pk>.+)$",
|
43
|
-
views.Element.as_view(),
|
44
|
-
),
|
45
|
-
]
|
46
|
-
return urls
|
47
|
-
|
48
|
-
def get_index_view(self):
|
49
|
-
from . import views
|
50
|
-
|
51
|
-
return views.Index.as_view()
|
lino/modlib/forms/models.py
DELETED
File without changes
|
lino/modlib/forms/renderer.py
DELETED
@@ -1,74 +0,0 @@
|
|
1
|
-
# -*- coding: UTF-8 -*-
|
2
|
-
# Copyright 2017 Rumma & Ko Ltd
|
3
|
-
# License: GNU Affero General Public License v3 (see file COPYING for details)
|
4
|
-
|
5
|
-
from __future__ import unicode_literals
|
6
|
-
from builtins import str
|
7
|
-
|
8
|
-
from lino.core import constants as ext_requests
|
9
|
-
from lino.core.renderer import HtmlRenderer
|
10
|
-
from lino.core.renderer import add_user_language
|
11
|
-
|
12
|
-
from .views import index_response
|
13
|
-
|
14
|
-
|
15
|
-
class Renderer(HtmlRenderer):
|
16
|
-
"""
|
17
|
-
A HTML render that uses Django forms.
|
18
|
-
"""
|
19
|
-
|
20
|
-
can_auth = False
|
21
|
-
|
22
|
-
def obj2url(self, ar, obj, **kw):
|
23
|
-
ba = obj.get_detail_action(ar)
|
24
|
-
if ba is not None:
|
25
|
-
add_user_language(kw, ar)
|
26
|
-
return self.get_detail_url(ar, ba.actor, obj.pk, **kw)
|
27
|
-
|
28
|
-
def get_detail_url(self, ar, actor, pk, *args, **kw):
|
29
|
-
return self.front_end.build_plain_url(
|
30
|
-
ar, actor.app_label, actor.__name__, str(pk), *args, **kw
|
31
|
-
)
|
32
|
-
|
33
|
-
def get_home_url(self, *args, **kw):
|
34
|
-
return self.front_end.build_plain_url(*args, **kw)
|
35
|
-
|
36
|
-
def get_request_url(self, ar, *args, **kw):
|
37
|
-
if ar.actor.__name__ == "Main":
|
38
|
-
return self.front_end.build_plain_url(*args, **kw)
|
39
|
-
|
40
|
-
st = ar.get_status()
|
41
|
-
kw.update(st["base_params"])
|
42
|
-
add_user_language(kw, ar)
|
43
|
-
if ar.offset is not None:
|
44
|
-
kw.setdefault(ext_requests.URL_PARAM_START, ar.offset)
|
45
|
-
if ar.limit is not None:
|
46
|
-
kw.setdefault(ext_requests.URL_PARAM_LIMIT, ar.limit)
|
47
|
-
if ar.order_by is not None:
|
48
|
-
sc = ar.order_by[0]
|
49
|
-
if sc.startswith("-"):
|
50
|
-
sc = sc[1:]
|
51
|
-
kw.setdefault(ext_requests.URL_PARAM_SORTDIR, "DESC")
|
52
|
-
kw.setdefault(ext_requests.URL_PARAM_SORT, sc)
|
53
|
-
# ~ print '20120901 TODO get_request_url'
|
54
|
-
|
55
|
-
return self.front_end.build_plain_url(
|
56
|
-
ar.actor.app_label, ar.actor.__name__, *args, **kw
|
57
|
-
)
|
58
|
-
|
59
|
-
def request_handler(self, ar, *args, **kw):
|
60
|
-
return ""
|
61
|
-
|
62
|
-
def action_button(self, obj, ar, ba, label=None, **kw):
|
63
|
-
label = label or ba.action.label
|
64
|
-
return label
|
65
|
-
|
66
|
-
def action_call(self, ar, bound_action, status):
|
67
|
-
a = bound_action.action
|
68
|
-
if a.opens_a_window or (a.parameters and not a.no_params_window):
|
69
|
-
return "#"
|
70
|
-
sar = bound_action.request_from(ar)
|
71
|
-
return self.get_request_url(sar)
|
72
|
-
|
73
|
-
def render_action_response(self, ar):
|
74
|
-
return index_response(ar)
|
lino/modlib/forms/views.py
DELETED
@@ -1,311 +0,0 @@
|
|
1
|
-
# -*- coding: UTF-8 -*-
|
2
|
-
# Copyright 2009-2017 Rumma & Ko Ltd
|
3
|
-
# License: GNU Affero General Public License v3 (see file COPYING for details)
|
4
|
-
"""Views for `lino.modlib.bootstrap3`.
|
5
|
-
|
6
|
-
"""
|
7
|
-
from __future__ import division
|
8
|
-
from past.utils import old_div
|
9
|
-
|
10
|
-
from lino import logger
|
11
|
-
|
12
|
-
from django import http
|
13
|
-
from django.conf import settings
|
14
|
-
from django.views.generic import View
|
15
|
-
from django.core import exceptions
|
16
|
-
from django.utils.translation import gettext as _
|
17
|
-
from django.utils.translation import get_language
|
18
|
-
|
19
|
-
# from django.contrib import auth
|
20
|
-
from lino.core import auth
|
21
|
-
|
22
|
-
# from lino.api import dd
|
23
|
-
from lino.core import constants
|
24
|
-
|
25
|
-
# from lino.core import auth
|
26
|
-
from lino.core.requests import BaseRequest
|
27
|
-
from lino.core.tables import AbstractTable
|
28
|
-
from lino.core.views import action_request
|
29
|
-
from lino.core.utils import navinfo
|
30
|
-
from lino.utils.html import E, tostring
|
31
|
-
from etgen import html as xghtml
|
32
|
-
|
33
|
-
PLAIN_PAGE_LENGTH = 15
|
34
|
-
|
35
|
-
MENUS = dict()
|
36
|
-
|
37
|
-
|
38
|
-
def http_response(ar, tplname, context):
|
39
|
-
"Deserves a docstring"
|
40
|
-
u = ar.get_user()
|
41
|
-
lang = get_language()
|
42
|
-
k = (u.user_type, lang)
|
43
|
-
menu = MENUS.get(k, None)
|
44
|
-
if menu is None:
|
45
|
-
menu = settings.SITE.get_site_menu(u.user_type)
|
46
|
-
bs3 = settings.SITE.plugins.bootstrap3
|
47
|
-
if False: # 20150803 home button now in base.html
|
48
|
-
assert bs3.renderer is not None
|
49
|
-
url = bs3.build_plain_url()
|
50
|
-
menu.add_url_button(url, label=_("Home"))
|
51
|
-
e = bs3.renderer.show_menu(ar, menu)
|
52
|
-
menu = tostring(e)
|
53
|
-
MENUS[k] = menu
|
54
|
-
context.update(menu=menu)
|
55
|
-
context = ar.get_printable_context(**context)
|
56
|
-
context["ar"] = ar
|
57
|
-
context["memo"] = ar.parse_memo # MEMO_PARSER.parse
|
58
|
-
env = settings.SITE.plugins.jinja.renderer.jinja_env
|
59
|
-
template = env.get_template(tplname)
|
60
|
-
|
61
|
-
response = http.HttpResponse(
|
62
|
-
template.render(**context), content_type='text/html;charset="utf-8"'
|
63
|
-
)
|
64
|
-
|
65
|
-
return response
|
66
|
-
|
67
|
-
|
68
|
-
def buttons2pager(buttons, title=None):
|
69
|
-
items = []
|
70
|
-
if title:
|
71
|
-
items.append(E.li(E.span(title)))
|
72
|
-
for symbol, label, url in buttons:
|
73
|
-
if url is None:
|
74
|
-
items.append(E.li(E.span(symbol), **{"class": "disabled"}))
|
75
|
-
else:
|
76
|
-
items.append(E.li(E.a(symbol, href=url)))
|
77
|
-
# Bootstrap version 2.x
|
78
|
-
# return E.div(E.ul(*items), class_='pagination')
|
79
|
-
return E.ul(*items, **{"class": "pagination pagination-sm"})
|
80
|
-
|
81
|
-
|
82
|
-
def table2html(ar, as_main=True):
|
83
|
-
"""Represent the given table request as an HTML table.
|
84
|
-
|
85
|
-
`ar` is the request to be rendered, an instance of
|
86
|
-
:class:`lino.core.requests.ActionRequest`.
|
87
|
-
|
88
|
-
The returned HTML enclosed in a ``<div>`` tag and generated using
|
89
|
-
:mod:`etgen.html`.
|
90
|
-
|
91
|
-
If `as_main` is True, include additional elements such as a paging
|
92
|
-
toolbar. (This argument is currently being ignored.)
|
93
|
-
|
94
|
-
"""
|
95
|
-
as_main = True
|
96
|
-
t = xghtml.Table()
|
97
|
-
t.set("class", "table table-striped table-hover")
|
98
|
-
if ar.limit is None:
|
99
|
-
ar.limit = PLAIN_PAGE_LENGTH
|
100
|
-
pglen = ar.limit
|
101
|
-
if ar.offset is None:
|
102
|
-
page = 1
|
103
|
-
else:
|
104
|
-
"""
|
105
|
-
(assuming pglen is 5)
|
106
|
-
offset page
|
107
|
-
0 1
|
108
|
-
5 2
|
109
|
-
"""
|
110
|
-
page = int(old_div(ar.offset, pglen)) + 1
|
111
|
-
|
112
|
-
ar.dump2html(t, ar.sliced_data_iterator, header_links=as_main)
|
113
|
-
if not as_main:
|
114
|
-
url = ar.get_request_url() # open in own window
|
115
|
-
return E.div(E.a(ar.get_title(), href=url), t.as_element())
|
116
|
-
|
117
|
-
buttons = []
|
118
|
-
kw = dict()
|
119
|
-
kw = {}
|
120
|
-
if pglen != PLAIN_PAGE_LENGTH:
|
121
|
-
kw[constants.URL_PARAM_LIMIT] = pglen
|
122
|
-
|
123
|
-
if page > 1:
|
124
|
-
kw[constants.URL_PARAM_START] = pglen * (page - 2)
|
125
|
-
prev_url = ar.get_request_url(**kw)
|
126
|
-
kw[constants.URL_PARAM_START] = 0
|
127
|
-
first_url = ar.get_request_url(**kw)
|
128
|
-
else:
|
129
|
-
prev_url = None
|
130
|
-
first_url = None
|
131
|
-
buttons.append(("<<", _("First page"), first_url))
|
132
|
-
buttons.append(("<", _("Previous page"), prev_url))
|
133
|
-
|
134
|
-
next_start = pglen * page
|
135
|
-
if next_start < ar.get_total_count():
|
136
|
-
kw[constants.URL_PARAM_START] = next_start
|
137
|
-
next_url = ar.get_request_url(**kw)
|
138
|
-
last_page = int(old_div((ar.get_total_count() - 1), pglen))
|
139
|
-
kw[constants.URL_PARAM_START] = pglen * last_page
|
140
|
-
last_url = ar.get_request_url(**kw)
|
141
|
-
else:
|
142
|
-
next_url = None
|
143
|
-
last_url = None
|
144
|
-
buttons.append((">", _("Next page"), next_url))
|
145
|
-
buttons.append((">>", _("Last page"), last_url))
|
146
|
-
|
147
|
-
return E.div(buttons2pager(buttons), t.as_element())
|
148
|
-
|
149
|
-
|
150
|
-
def layout2html(ar, elem):
|
151
|
-
wl = ar.bound_action.get_window_layout()
|
152
|
-
# ~ print 20120901, wl.main
|
153
|
-
lh = wl.get_layout_handle()
|
154
|
-
|
155
|
-
items = list(lh.main.as_plain_html(ar, elem))
|
156
|
-
# if navigator:
|
157
|
-
# items.insert(0, navigator)
|
158
|
-
# ~ print tostring(E.div())
|
159
|
-
# ~ if len(items) == 0: return ""
|
160
|
-
return E.form(*items)
|
161
|
-
# ~ print 20120901, lh.main.__html__(ar)
|
162
|
-
|
163
|
-
|
164
|
-
class List(View):
|
165
|
-
"""Render a list of records."""
|
166
|
-
|
167
|
-
def get(self, request, app_label=None, actor=None):
|
168
|
-
ar = action_request(app_label, actor, request, request.GET, True)
|
169
|
-
ar.renderer = settings.SITE.plugins.bootstrap3.renderer
|
170
|
-
|
171
|
-
context = dict(
|
172
|
-
title=ar.get_title(),
|
173
|
-
heading=ar.get_title(),
|
174
|
-
)
|
175
|
-
|
176
|
-
if ar.actor is not None and issubclass(ar.actor, AbstractTable):
|
177
|
-
context.update(main=table2html(ar))
|
178
|
-
else:
|
179
|
-
context.update(main=layout2html(ar, None))
|
180
|
-
|
181
|
-
context.update(ar=ar)
|
182
|
-
return http_response(ar, ar.actor.list_html_template, context)
|
183
|
-
|
184
|
-
|
185
|
-
class Element(View):
|
186
|
-
"""Render a single record."""
|
187
|
-
|
188
|
-
def get(self, request, app_label=None, actor=None, pk=None):
|
189
|
-
ar = action_request(app_label, actor, request, request.GET, False)
|
190
|
-
ar.renderer = settings.SITE.plugins.bootstrap3.renderer
|
191
|
-
|
192
|
-
navigator = None
|
193
|
-
if pk and pk != "-99999" and pk != "-99998":
|
194
|
-
elem = ar.get_row_by_pk(pk)
|
195
|
-
if elem is None:
|
196
|
-
raise http.Http404("%s has no row with primary key %r" % (ar.actor, pk))
|
197
|
-
# ~ raise Exception("20120327 %s.get_row_by_pk(%r)" % (rpt,pk))
|
198
|
-
if ar.actor.show_detail_navigator:
|
199
|
-
ni = navinfo(ar.data_iterator, elem)
|
200
|
-
if ni:
|
201
|
-
# m = elem.__class__
|
202
|
-
buttons = []
|
203
|
-
# ~ buttons.append( ('*',_("Home"), '/' ))
|
204
|
-
|
205
|
-
buttons.append(("<<", _("First page"), ar.pk2url(ni["first"])))
|
206
|
-
buttons.append(("<", _("Previous page"), ar.pk2url(ni["prev"])))
|
207
|
-
buttons.append((">", _("Next page"), ar.pk2url(ni["next"])))
|
208
|
-
buttons.append((">>", _("Last page"), ar.pk2url(ni["last"])))
|
209
|
-
|
210
|
-
navigator = buttons2pager(buttons)
|
211
|
-
else:
|
212
|
-
navigator = E.p("No navinfo")
|
213
|
-
else:
|
214
|
-
elem = None
|
215
|
-
|
216
|
-
main = layout2html(ar, elem)
|
217
|
-
|
218
|
-
# The `method="html"` argument isn't available in Python 2.6,
|
219
|
-
# only 2.7. It is useful to avoid side effects in case of
|
220
|
-
# empty elements: the default method (xml) writes an empty
|
221
|
-
# E.div() as "<div/>" while in HTML5 it must be "<div></div>"
|
222
|
-
# (and the ending / is ignored).
|
223
|
-
|
224
|
-
# ~ return tostring(main, method="html")
|
225
|
-
# ~ return tostring(main)
|
226
|
-
# return main
|
227
|
-
|
228
|
-
context = dict(
|
229
|
-
title=ar.get_action_title(),
|
230
|
-
obj=elem,
|
231
|
-
form=main,
|
232
|
-
navigator=navigator,
|
233
|
-
)
|
234
|
-
# ~ template = web.jinja_env.get_template('detail.html')
|
235
|
-
context.update(ar=ar)
|
236
|
-
return http_response(ar, ar.actor.detail_html_template, context)
|
237
|
-
|
238
|
-
|
239
|
-
class Authenticate(View):
|
240
|
-
def get(self, request, *args, **kw):
|
241
|
-
action_name = request.GET.get(constants.URL_PARAM_ACTION_NAME)
|
242
|
-
if action_name == "logout":
|
243
|
-
username = request.session.pop("username", None)
|
244
|
-
auth.logout(request)
|
245
|
-
# request.user = settings.SITE.user_model.get_anonymous_user()
|
246
|
-
# request.session.pop('password', None)
|
247
|
-
# ~ username = request.session['username']
|
248
|
-
# ~ del request.session['password']
|
249
|
-
target = "/"
|
250
|
-
return http.HttpResponseRedirect(target)
|
251
|
-
|
252
|
-
# ar = BaseRequest(request)
|
253
|
-
# ar.success("User %r logged out." % username)
|
254
|
-
# return ar.renderer.render_action_response(ar)
|
255
|
-
raise http.Http404()
|
256
|
-
|
257
|
-
def post(self, request, *args, **kw):
|
258
|
-
username = request.POST.get("username")
|
259
|
-
password = request.POST.get("password")
|
260
|
-
user = auth.authenticate(request, username=username, password=password)
|
261
|
-
auth.login(request, user)
|
262
|
-
target = "/"
|
263
|
-
return http.HttpResponseRedirect(target)
|
264
|
-
# ar = BaseRequest(request)
|
265
|
-
# mw = auth.get_auth_middleware()
|
266
|
-
# msg = mw.authenticate(username, password, request)
|
267
|
-
# if msg:
|
268
|
-
# request.session.pop('username', None)
|
269
|
-
# ar.error(msg)
|
270
|
-
# else:
|
271
|
-
# request.session['username'] = username
|
272
|
-
# # request.session['password'] = password
|
273
|
-
# # ar.user = request....
|
274
|
-
# ar.success(("Now logged in as %r" % username))
|
275
|
-
# # print "20150428 Now logged in as %r (%s)" % (username, user)
|
276
|
-
# return ar.renderer.render_action_response(ar)
|
277
|
-
|
278
|
-
|
279
|
-
class Index(View):
|
280
|
-
"""
|
281
|
-
Render the main page.
|
282
|
-
"""
|
283
|
-
|
284
|
-
def get(self, request, *args, **kw):
|
285
|
-
# raise Exception("20171122 {} {}".format(
|
286
|
-
# get_language(), settings.MIDDLEWARE_CLASSES))
|
287
|
-
ui = settings.SITE.plugins.bootstrap3
|
288
|
-
# print("20170607", request.user)
|
289
|
-
# assert ui.renderer is not None
|
290
|
-
ar = BaseRequest(
|
291
|
-
# user=user,
|
292
|
-
request=request,
|
293
|
-
renderer=ui.renderer,
|
294
|
-
)
|
295
|
-
return index_response(ar)
|
296
|
-
|
297
|
-
|
298
|
-
def index_response(ar):
|
299
|
-
ui = settings.SITE.plugins.bootstrap3
|
300
|
-
main = settings.SITE.get_main_html(ar, front_end=ui)
|
301
|
-
main = ui.renderer.html_text(main)
|
302
|
-
context = dict(
|
303
|
-
title=settings.SITE.title,
|
304
|
-
main=main,
|
305
|
-
)
|
306
|
-
# if settings.SITE.user_model is None:
|
307
|
-
# user = auth.AnonymousUser.instance()
|
308
|
-
# else:
|
309
|
-
# user = request.subst_user or request.user
|
310
|
-
# context.update(ar=ar)
|
311
|
-
return http_response(ar, "bootstrap3/index.html", context)
|
File without changes
|
File without changes
|
File without changes
|