lino 25.2.3__py3-none-any.whl → 25.3.1__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 (81) hide show
  1. lino/__init__.py +1 -1
  2. lino/api/dd.py +11 -48
  3. lino/api/doctest.py +34 -36
  4. lino/core/actions.py +25 -23
  5. lino/core/actors.py +37 -17
  6. lino/core/choicelists.py +10 -8
  7. lino/core/dbtables.py +1 -1
  8. lino/core/elems.py +46 -30
  9. lino/core/fields.py +19 -9
  10. lino/core/inject.py +7 -6
  11. lino/core/kernel.py +26 -66
  12. lino/core/model.py +44 -31
  13. lino/core/plugin.py +4 -4
  14. lino/core/requests.py +76 -55
  15. lino/core/site.py +84 -30
  16. lino/core/store.py +5 -2
  17. lino/core/utils.py +12 -7
  18. lino/help_texts.py +3 -8
  19. lino/management/commands/prep.py +1 -1
  20. lino/mixins/duplicable.py +6 -4
  21. lino/mixins/sequenced.py +17 -6
  22. lino/modlib/__init__.py +0 -2
  23. lino/modlib/changes/models.py +21 -10
  24. lino/modlib/checkdata/models.py +59 -24
  25. lino/modlib/comments/fixtures/demo2.py +12 -3
  26. lino/modlib/comments/models.py +7 -7
  27. lino/modlib/comments/ui.py +8 -5
  28. lino/modlib/export_excel/models.py +7 -5
  29. lino/modlib/extjs/views.py +39 -20
  30. lino/modlib/help/management/commands/makehelp.py +5 -2
  31. lino/modlib/jinja/mixins.py +25 -14
  32. lino/modlib/linod/__init__.py +1 -0
  33. lino/modlib/linod/choicelists.py +21 -0
  34. lino/modlib/linod/consumers.py +13 -4
  35. lino/modlib/linod/management/commands/linod.py +6 -2
  36. lino/modlib/linod/mixins.py +16 -11
  37. lino/modlib/linod/models.py +4 -2
  38. lino/modlib/notify/models.py +18 -10
  39. lino/modlib/printing/actions.py +41 -30
  40. lino/modlib/printing/choicelists.py +11 -9
  41. lino/modlib/printing/mixins.py +25 -20
  42. lino/modlib/publisher/models.py +5 -5
  43. lino/modlib/summaries/models.py +3 -2
  44. lino/modlib/system/models.py +28 -29
  45. lino/modlib/uploads/__init__.py +5 -5
  46. lino/modlib/uploads/actions.py +2 -8
  47. lino/modlib/uploads/choicelists.py +10 -10
  48. lino/modlib/uploads/fixtures/std.py +17 -0
  49. lino/modlib/uploads/mixins.py +20 -8
  50. lino/modlib/uploads/models.py +60 -35
  51. lino/modlib/uploads/ui.py +10 -7
  52. lino/utils/media.py +45 -23
  53. lino/utils/report.py +5 -4
  54. lino/utils/soup.py +22 -4
  55. {lino-25.2.3.dist-info → lino-25.3.1.dist-info}/METADATA +1 -1
  56. {lino-25.2.3.dist-info → lino-25.3.1.dist-info}/RECORD +59 -80
  57. lino/mixins/uploadable.py +0 -3
  58. lino/sandbox/bcss/PerformInvestigation.py +0 -2260
  59. lino/sandbox/bcss/SSDNReply.py +0 -3924
  60. lino/sandbox/bcss/SSDNRequest.py +0 -3723
  61. lino/sandbox/bcss/__init__.py +0 -0
  62. lino/sandbox/bcss/readme.txt +0 -1
  63. lino/sandbox/bcss/test.py +0 -92
  64. lino/sandbox/bcss/test2.py +0 -128
  65. lino/sandbox/bcss/test3.py +0 -161
  66. lino/sandbox/bcss/test4.py +0 -167
  67. lino/sandbox/contacts/__init__.py +0 -0
  68. lino/sandbox/contacts/fixtures/__init__.py +0 -0
  69. lino/sandbox/contacts/fixtures/demo.py +0 -365
  70. lino/sandbox/contacts/manage.py +0 -10
  71. lino/sandbox/contacts/models.py +0 -395
  72. lino/sandbox/contacts/settings.py +0 -67
  73. lino/sandbox/tx25/XSD/RetrieveTIGroupsV3.wsdl +0 -65
  74. lino/sandbox/tx25/XSD/RetrieveTIGroupsV3.xsd +0 -286
  75. lino/sandbox/tx25/XSD/rn25_Release201104.xsd +0 -2855
  76. lino/sandbox/tx25/xsd2py1.py +0 -68
  77. lino/sandbox/tx25/xsd2py2.py +0 -62
  78. lino/sandbox/tx25/xsd2py3.py +0 -56
  79. {lino-25.2.3.dist-info → lino-25.3.1.dist-info}/WHEEL +0 -0
  80. {lino-25.2.3.dist-info → lino-25.3.1.dist-info}/licenses/AUTHORS.rst +0 -0
  81. {lino-25.2.3.dist-info → lino-25.3.1.dist-info}/licenses/COPYING +0 -0
@@ -1,365 +0,0 @@
1
- # -*- coding: UTF-8 -*-
2
- # Copyright 2008-2013 Rumma & Ko Ltd
3
- # License: GNU Affero General Public License v3 (see file COPYING for details)
4
-
5
- from django.db import models
6
- from django.conf import settings
7
- from django.utils.translation import gettext as _
8
-
9
- from lino.core.utils import resolve_model
10
- from lino.utils.instantiator import Instantiator
11
- from lino.api import dd
12
- from lino.utils import dblogger
13
- from lino.utils import Cycler
14
-
15
- from lino.sandbox.contacts import models as contacts
16
-
17
- # ~ print 20120225, 'settings.FIXTURE_DIRS is', settings.FIXTURE_DIRS
18
-
19
- dblogger.info("Imported contacts demo fixture")
20
-
21
- COUNT = 0
22
-
23
- # ~ addresstype= Instantiator('contacts.AddressType',"name").build
24
- role = Instantiator("contacts.Role", "name").build
25
- # ~ person = Instantiator('contacts.Person',"first_name last_name").build
26
- # ~ company = Instantiator('contacts.Company',"name").build
27
- # ~ contact = Instantiator('contacts.Contact').build
28
-
29
- Company = contacts.Company
30
- Person = contacts.Person
31
- User = contacts.User
32
- City = resolve_model("countries.City")
33
-
34
- if not settings.SITE.abstract_address:
35
- Address = contacts.Address
36
- address = Instantiator(Address, "country zip_code city:name street street_no").build
37
-
38
-
39
- def company(name, country_id, zip_code, city, street, street_no):
40
- if settings.SITE.abstract_address:
41
- city = City.objects.get(name=city)
42
- yield Company(
43
- name=name,
44
- country_id=country_id,
45
- zip_code=zip_code,
46
- city=city,
47
- street=street,
48
- street_no=street_no,
49
- )
50
- else:
51
- addr = address(country_id, zip_code, city, street, street_no)
52
- yield addr
53
- com = Company(name=name, address=addr)
54
- yield com
55
-
56
-
57
- def person(first_name, last_name, country_id=None, zip_code="", city=None, **kw):
58
- if settings.SITE.abstract_address:
59
- if city is not None:
60
- city = City.objects.get(name=city)
61
- yield Person(
62
- first_name=first_name,
63
- last_name=last_name,
64
- country_id=country_id,
65
- zip_code=zip_code,
66
- city=city,
67
- )
68
- else:
69
- addr = address(country_id, zip_code, city)
70
- yield addr
71
- yield Person(first_name=first_name, last_name=last_name, address=addr)
72
-
73
-
74
- def contact(company, person, **kw):
75
- return contacts.Contact(person=person, company=company, **kw)
76
-
77
-
78
- def objects():
79
- global COUNT
80
- COUNT += 1
81
- dblogger.info("Started contacts demo fixture %d", COUNT)
82
-
83
- # ~ yield addresstype(**dd.babel_values('name',en="Default",fr=u'Gérant',de=u"Geschäftsführer",et=u"Manager"))
84
-
85
- yield role(
86
- **dd.babel_values(
87
- "name", en="Manager", fr="Gérant", de="Geschäftsführer", et="Manager"
88
- )
89
- )
90
- yield role(
91
- **dd.babel_values(
92
- "name", en="Director", fr="Directeur", de="Direktor", et="Direktor"
93
- )
94
- )
95
- yield role(
96
- **dd.babel_values(
97
- "name", en="Secretary", fr="Sécrétaire", de="Sekretär", et="Sekretär"
98
- )
99
- )
100
- yield role(
101
- **dd.babel_values(
102
- "name",
103
- en="IT Manager",
104
- fr="Gérant informatique",
105
- de="EDV-Manager",
106
- et="IT manager",
107
- )
108
- )
109
-
110
- yield company("Rumma & Ko OÜ", "EE", "10115", "Tallinn", "Tartu mnt", "71")
111
-
112
- yield company(
113
- "Bäckerei Ausdemwald", "BE", "4700", "Eupen", "Vervierser Straße", "45"
114
- )
115
- yield company("Bäckerei Mießen", "BE", "4700", "Eupen", "Gospert", "103")
116
- yield company("Bäckerei Schmitz", "BE", "4700", "Eupen", "Aachener Straße", "53")
117
- yield company("Garage Mergelsberg", "BE", "4720", "Kelmis", "Kasinostraße", "13")
118
-
119
- yield company("Donderweer BV", "NL", "4816 AR", "Breda", "Edisonstraat", "12")
120
- yield company("Van Achter NV", "NL", "4836 LG", "Breda", "Hazeldonk", "2")
121
-
122
- yield company("Hans Flott & Co", "DE", "22453", "Hamburg", "Niendorfer Weg", "532")
123
- yield company(
124
- "Bernd Brechts Bücherladen", "DE", "80333", "München", "Brienner Straße", "18"
125
- )
126
- yield company(
127
- "Reinhards Baumschule", "DE", "12487 ", "Berlin", "Segelfliegerdamm", "123"
128
- )
129
-
130
- yield company("Moulin Rouge", "FR", "75018", "Paris", "Boulevard de Clichy", "82")
131
- yield company(
132
- "Auto École Verte", "FR", "54000 ", "Nancy", "rue de Mon Désert", "12"
133
- )
134
-
135
- # ~ yield person(u'Luc', u'Saffre', gender=Gender.male)
136
- yield person("Andreas", "Arens", "BE", "4700", "Eupen", gender=dd.Genders.male)
137
- yield person("Annette", "Arens", "BE", "4700", "Eupen", gender=dd.Genders.female)
138
- yield person("Hans", "Altenberg", "BE", "4700", "Eupen", gender=dd.Genders.male)
139
- yield person("Alfons", "Ausdemwald", "BE", "4700", "Eupen", gender=dd.Genders.male)
140
- yield person(
141
- "Laurent", "Bastiaensen", "BE", "4700", "Eupen", gender=dd.Genders.male
142
- )
143
- yield person(
144
- "Charlotte", "Collard", "BE", "4700", "Eupen", gender=dd.Genders.female
145
- )
146
- yield person("Ulrike", "Charlier", "BE", "4700", "Eupen", gender=dd.Genders.female)
147
- yield person("Marc", "Chantraine", "BE", "4700", "Eupen", gender=dd.Genders.male)
148
- yield person("Daniel", "Dericum", "BE", "4700", "Eupen", gender=dd.Genders.male)
149
- yield person(
150
- "Dorothée", "Demeulenaere", "BE", "4700", "Eupen", gender=dd.Genders.female
151
- )
152
- yield person("Berta", "Ernst", "BE", "4700", "Eupen", gender=dd.Genders.female)
153
- yield person("Bernd", "Evertz", "BE", "4700", "Eupen", gender=dd.Genders.male)
154
- yield person("Eberhart", "Evers", "BE", "4700", "Eupen", gender=Gender.male)
155
- yield person("Daniel", "Emonts", "BE", "4700", "Eupen", gender=Gender.male)
156
- yield person("Edgar", "Engels", "BE", "4700", "Eupen", gender=Gender.male)
157
- yield person("Luc", "Faymonville", "BE", "4700", "Eupen", gender=Gender.male)
158
- yield person("Gérard", "Gernegroß", "BE", "4700", "Eupen", gender=Gender.male)
159
- yield person("Werner", "Groteclaes", "BE", "4700", "Eupen", gender=Gender.male)
160
- yield person("Grete", "Hilgers", "BE", "4700", "Eupen", gender=Gender.female)
161
- yield person("Hans", "Hilgers", "BE", "4700", "Eupen", gender=Gender.male)
162
- yield person("Irene", "Ingels", "BE", "4700", "Eupen", gender=Gender.female)
163
- yield person("Jérémy", "Jansen", "BE", "4700", "Eupen", gender=Gender.male)
164
- yield person("Jean-Pierre", "Jacob", "BE", "4700", "Eupen", gender=Gender.male)
165
- yield person("Herbert", "Johnen", "BE", "4700", "Eupen", gender=Gender.male)
166
- yield person("Johannes", "Jonas", "BE", "4700", "Eupen", gender=Gender.male)
167
- yield person("Jan", "Jousten", "BE", "4700", "Eupen", gender=Gender.male)
168
- yield person("Karl", "Kaivers", "BE", "4700", "Eupen", gender=Gender.male)
169
- yield person("Guido", "Lambertz", "BE", "4700", "Eupen", gender=Gender.male)
170
- yield person("Luc", "Laschet", "BE", "4700", "Eupen", gender=Gender.male)
171
- yield person("Line", "Lazarus", "BE", "4700", "Eupen", gender=Gender.female)
172
- yield person("Josefine", "Leffin", "BE", "4700", "Eupen", gender=Gender.female)
173
- yield person("Marc", "Malmendier", "BE", "4700", "Eupen", gender=Gender.male)
174
- yield person("Leo", "Meessen", "BE", "4700", "Eupen", gender=Gender.male)
175
- yield person("Franz", "Mießen", "BE", "4700", "Eupen", gender=Gender.male)
176
- yield person("Marie-Louise", "Meier", "BE", "4700", "Eupen", gender=Gender.female)
177
-
178
- yield person("Erich", "Emonts", "BE", "4730", "Raeren", gender=Gender.male)
179
- yield person("Erwin", "Emontspool", "BE", "4730", "Raeren", gender=Gender.male)
180
- yield person("Erna", "Emonts-Gast", "BE", "4730", "Raeren", gender=Gender.female)
181
- yield person("Alfons", "Radermacher", "BE", "4730", "Raeren", gender=Gender.male)
182
- yield person("Berta", "Radermacher", "BE", "4730", "Raeren", gender=Gender.female)
183
- yield person("Christian", "Radermacher", "BE", "4730", "Raeren", gender=Gender.male)
184
- yield person("Daniela", "Radermacher", "BE", "4730", "Raeren", gender=Gender.female)
185
- yield person("Edgard", "Radermacher", "BE", "4730", "Raeren", gender=Gender.male)
186
- yield person("Fritz", "Radermacher", "BE", "4730", "Raeren", gender=Gender.male)
187
- yield person("Guido", "Radermacher", "BE", "4730", "Raeren", gender=Gender.male)
188
- yield person("Hans", "Radermacher", "BE", "4730", "Raeren", gender=Gender.male)
189
- yield person("Hedi", "Radermacher", "BE", "4730", "Raeren", gender=Gender.female)
190
- yield person("Inge", "Radermacher", "BE", "4730", "Raeren", gender=Gender.female)
191
- yield person("Jean", "Radermacher", "BE", "4730", "Raeren", gender=Gender.male)
192
-
193
- # special challenges for alphabetic ordering
194
- yield person("Elio", "di Rupo")
195
- yield person("Leonardo", "da Vinci")
196
- yield person("Herman", "van Veen")
197
- yield person("Rein", "Õunapuu")
198
- yield person("Otto", "Östges")
199
- yield person("Erna", "Ärgerlich")
200
-
201
- yield person("Bernard", "Bodard", title="Dr.")
202
- yield person("Jean", "Dupont")
203
-
204
- yield person("Mark", "Martelaer")
205
- yield person("Rik", "Radermecker")
206
- yield person("Marie-Louise", "Vandenmeulenbos")
207
-
208
- yield person("Emil", "Eierschal")
209
- yield person("Lisa", "Lahm")
210
- yield person("Bernd", "Brecht")
211
- yield person("Karl", "Keller")
212
-
213
- yield person("Robin", "Dubois")
214
- yield person("Denis", "Denon")
215
- yield person("Jérôme", "Jeanémart")
216
-
217
- s = """\
218
- Aachener Straße
219
- Akazienweg
220
- Alter Malmedyer Weg
221
- Am Bahndamm
222
- Am Berg
223
- Am Waisenbüschchen
224
- Auenweg
225
- Auf dem Spitzberg
226
- Auf'm Rain
227
- August-Thonnar-Str.
228
- Bahnhofsgasse
229
- Bahnhofstraße
230
- Bellmerin
231
- Bennetsborn
232
- Bergkapellstraße
233
- Bergstraße
234
- Binsterweg
235
- Brabantstraße
236
- Buchenweg
237
- Edelstraße
238
- Euregiostraße
239
- Favrunpark
240
- Feldstraße
241
- Fränzel
242
- Gewerbestraße
243
- Gospert
244
- Gülcherstraße
245
- Haagenstraße
246
- Haasberg
247
- Haasstraße
248
- Habsburgerweg
249
- Heidberg
250
- Heidgasse
251
- Heidhöhe
252
- Herbesthaler Straße
253
- Hisselsgasse
254
- Hochstraße
255
- Hook
256
- Hostert
257
- Hufengasse
258
- Hugo-Zimmermann-Str.
259
- Hütte
260
- Hütterprivatweg
261
- Im Peschgen
262
- In den Siepen
263
- Industriestraße
264
- Johannesstraße
265
- Judenstraße
266
- Kaperberg
267
- Kaplan-Arnolds-Str.
268
- Karl-Weiß-Str.
269
- Kehrweg
270
- Kirchgasse
271
- Kirchstraße
272
- Klinkeshöfchen
273
- Kügelgasse
274
- Langesthal
275
- Lascheterweg
276
- Limburgerweg
277
- Lindenweg
278
- Lothringerweg
279
- Malmedyer Straße
280
- Maria-Theresia-Straße
281
- Marktplatz
282
- Monschauer Straße
283
- Mühlenweg
284
- Neustraße
285
- Nikolausfeld
286
- Nispert
287
- Noereth
288
- Obere Ibern
289
- Obere Rottergasse
290
- Oestraße
291
- Olengraben
292
- Panorama
293
- Paveestraße
294
- Peter-Becker-Str.
295
- Rosenweg
296
- Rot-Kreuz-Str.
297
- Rotenberg
298
- Rotenbergplatz
299
- Schilsweg
300
- Schlüsselhof
301
- Schnellewindgasse
302
- Schönefeld
303
- Schorberg
304
- Schulstraße
305
- Selterschlag
306
- Simarstraße
307
- Steinroth
308
- Stendrich
309
- Stockbergerweg
310
- Stockem
311
- Theodor-Mooren-Str.
312
- Untere Ibern
313
- Vervierser Straße
314
- Vossengasse
315
- Voulfeld
316
- Werthplatz
317
- Weserstraße
318
- """
319
-
320
- streets_of_eupen = [
321
- line.strip() for line in s.splitlines() if len(line.strip()) > 0
322
- ]
323
-
324
- if settings.SITE.abstract_address:
325
- nr = 1
326
- # ~ CITIES = Cycler(City.objects.all())
327
- eupen = City.objects.get(name="Eupen")
328
- STREETS = Cycler(streets_of_eupen)
329
- for p in Person.objects.filter(city=eupen):
330
- p.street = STREETS.pop()
331
- p.street_no = str(nr)
332
- p.save()
333
- nr += 1
334
- else:
335
- nr = 1
336
- for street in streets_of_eupen:
337
- for i in range(3):
338
- yield address("BE", "4700", "Eupen", street, str(nr))
339
- nr += 1
340
-
341
- ADDRESSES = Cycler(Address.objects.all())
342
- for p in Person.objects.all():
343
- p.address = ADDRESSES.pop()
344
- p.save()
345
-
346
- PERSONS = Cycler(contacts.Person.objects.all())
347
- COMPANIES = Cycler(contacts.Company.objects.all())
348
- ROLES = Cycler(contacts.Role.objects.all())
349
- for i in range(100):
350
- com = COMPANIES.pop()
351
- yield contact(com, PERSONS.pop(), role=ROLES.pop())
352
- yield contact(com, PERSONS.pop(), role=ROLES.pop())
353
-
354
- rumma = contacts.Company.objects.get(name="Rumma & Ko OÜ")
355
-
356
- def user(first_name, last_name, **kw):
357
- p = Person(first_name=first_name, last_name=last_name)
358
- p.save()
359
- return User(person=p, company=rumma, **kw)
360
-
361
- # ~ yield user("Alice","Imedemaal",is_superuser=True)
362
- yield user("Alice", "Imedemaal", user_type=UserTypes.admin)
363
- yield user("Bert", "Sesamestreet")
364
- yield user("Charles", "Braun")
365
- dblogger.info("Done contacts demo fixture")
@@ -1,10 +0,0 @@
1
- #!/usr/bin/env python
2
- import os
3
-
4
- os.environ["DJANGO_SETTINGS_MODULE"] = "lino.sandbox.contacts.settings"
5
-
6
- import settings
7
-
8
- from django.core.management import execute_manager
9
-
10
- execute_manager(settings)