q2rad 0.1.211__tar.gz → 0.1.212__tar.gz

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.

Potentially problematic release.


This version of q2rad might be problematic. Click here for more details.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: q2rad
3
- Version: 0.1.211
3
+ Version: 0.1.212
4
4
  Summary: RAD - database, GUI, reports
5
5
  Author: Andrei Puchko
6
6
  Author-email: andrei.puchko@gmx.de
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "q2rad"
3
- version = "0.1.211"
3
+ version = "0.1.212"
4
4
  description = "RAD - database, GUI, reports"
5
5
  authors = ["Andrei Puchko <andrei.puchko@gmx.de>"]
6
6
  readme = "README.md"
@@ -16,6 +16,7 @@
16
16
  from q2db.cursor import Q2Cursor
17
17
  from q2gui.q2model import Q2CursorModel
18
18
  from q2gui.q2dialogs import q2AskYN
19
+ from q2gui import q2app
19
20
  from q2rad.q2utils import Q2Form
20
21
  from q2rad.q2utils import Q2_save_and_run
21
22
  from q2gui.q2utils import num
@@ -34,6 +35,7 @@ class Q2Modules(Q2Form, Q2_save_and_run):
34
35
 
35
36
  def on_init(self):
36
37
  self.editor_actions = Q2Actions()
38
+ self.db = q2app.q2_app.db_logic
37
39
  self.add_control(
38
40
  "name",
39
41
  _("Name"),
@@ -18,6 +18,7 @@ from q2gui.q2model import Q2CursorModel
18
18
  from q2gui.q2dialogs import q2Mess, q2AskYN
19
19
 
20
20
  from q2rad.q2utils import Q2Form
21
+ from q2gui import q2app
21
22
  import gettext
22
23
 
23
24
 
@@ -30,6 +31,7 @@ class Q2Packages(Q2Form):
30
31
  self.no_view_action = True
31
32
 
32
33
  def on_init(self):
34
+ self.db = q2app.q2_app.db_logic
33
35
  self.add_control("package_name", _("Name"), datatype="char", datalen=100, pk="*")
34
36
  self.add_control("package_pipname", _("Pip name"), datatype="char", datalen=100)
35
37
  self.add_control("package_version", _("Version"), datatype="char", datalen=10)
@@ -23,6 +23,7 @@ import json
23
23
  import gettext
24
24
  import re
25
25
  from q2rad.q2utils import Q2Form
26
+ from q2gui import q2app
26
27
 
27
28
  _ = gettext.gettext
28
29
  re_find_param = re.compile(r"(?::\b\w+\b|\{.+\})")
@@ -35,6 +36,7 @@ class Q2Queries(Q2Form, Q2_save_and_run):
35
36
 
36
37
  def on_init(self):
37
38
  self.create_form()
39
+ self.db = q2app.q2_app.db_logic
38
40
 
39
41
  cursor: Q2Cursor = self.q2_app.db_logic.table(table_name="queries")
40
42
  model = Q2CursorModel(cursor)
@@ -218,6 +218,7 @@ class Q2Reports(Q2Form, Q2_save_and_run):
218
218
 
219
219
  def on_init(self):
220
220
  self.report_edit_form = None
221
+ self.db = q2app.q2_app.db_logic
221
222
 
222
223
  self.add_control("name", _("Name"), datatype="char", datalen=100, pk="*")
223
224
  self.add_control("/")
@@ -233,6 +233,7 @@ class Q2Form(_Q2Form):
233
233
  self.db,
234
234
  )
235
235
  form = Q2Form(f"Changelog ({self.title})")
236
+ form.db = self.db
236
237
  form.add_control("/")
237
238
  form.add_control("/h", "-")
238
239
  form.add_control("q2_mode", "Mode", datalen=3)
@@ -290,12 +291,14 @@ class q2cursor(Q2Cursor):
290
291
  def __init__(self, sql="", q2_db=None, data=[]):
291
292
  if q2_db is None:
292
293
  q2_db = q2app.q2_app.db_data
294
+ self._q2_db = q2_db
293
295
  super().__init__(q2_db, sql, data=data)
294
296
  if q2_db.last_sql_error:
295
297
  print(q2_db.last_sql_error)
296
298
 
297
299
  def q2form(self):
298
300
  form = Q2Form(self.sql)
301
+ form.db = self._q2_db
299
302
  for x in self.record(0):
300
303
  form.add_control(x, x, datalen=250)
301
304
  form.set_model(Q2CursorModel(self))
@@ -0,0 +1 @@
1
+ __version__ = "0.1.212"
@@ -1 +0,0 @@
1
- __version__ = "0.1.211"
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes