q2rad 0.1.224__py3-none-any.whl → 0.1.225__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.
Potentially problematic release.
This version of q2rad might be problematic. Click here for more details.
- q2rad/q2rad.py +10 -1
- q2rad/q2raddb.py +24 -2
- q2rad/version.py +1 -1
- {q2rad-0.1.224.dist-info → q2rad-0.1.225.dist-info}/METADATA +1 -1
- {q2rad-0.1.224.dist-info → q2rad-0.1.225.dist-info}/RECORD +8 -8
- {q2rad-0.1.224.dist-info → q2rad-0.1.225.dist-info}/LICENSE +0 -0
- {q2rad-0.1.224.dist-info → q2rad-0.1.225.dist-info}/WHEEL +0 -0
- {q2rad-0.1.224.dist-info → q2rad-0.1.225.dist-info}/entry_points.txt +0 -0
q2rad/q2rad.py
CHANGED
|
@@ -123,6 +123,8 @@ def run_module(module_name=None, _globals={}, _locals={}, script="", import_only
|
|
|
123
123
|
ext_module_name = row["prefix"] + module_name
|
|
124
124
|
if get("modules", f"name='{ext_module_name}'", "name", q2app.q2_app.db_logic) == ext_module_name:
|
|
125
125
|
ext_modules.append(ext_module_name)
|
|
126
|
+
if get("modules", f"name='_{module_name}'", "name", q2app.q2_app.db_logic) == f"_{module_name}":
|
|
127
|
+
ext_modules.append(f"_{module_name}")
|
|
126
128
|
if script:
|
|
127
129
|
code = q2app.q2_app.code_compiler(script)
|
|
128
130
|
if code["code"] is False:
|
|
@@ -1316,6 +1318,10 @@ class Q2RadApp(Q2App):
|
|
|
1316
1318
|
f"""select * from (select * from actions
|
|
1317
1319
|
where name = '{ext_name}{name}' order by seq) qq"""
|
|
1318
1320
|
)
|
|
1321
|
+
ext_actions.append(
|
|
1322
|
+
f"""select * from (select * from actions
|
|
1323
|
+
where name = '_{name}' order by seq) qq"""
|
|
1324
|
+
)
|
|
1319
1325
|
if ext_actions:
|
|
1320
1326
|
ext_select = " union all " + " union all ".join(ext_actions)
|
|
1321
1327
|
else:
|
|
@@ -1413,7 +1419,10 @@ class Q2RadApp(Q2App):
|
|
|
1413
1419
|
module = x.split("import")[1].strip()
|
|
1414
1420
|
if self.db_logic.get("modules", f"name='{module}'", "name"):
|
|
1415
1421
|
# x = x.split("import")[0] + f"run_module('{module}', import_only=True)"
|
|
1416
|
-
x =
|
|
1422
|
+
x = (
|
|
1423
|
+
x.split("import")[0]
|
|
1424
|
+
+ f"run_module('{module}', _globals=globals(), import_only=True)"
|
|
1425
|
+
)
|
|
1417
1426
|
|
|
1418
1427
|
new_script_lines.append(x)
|
|
1419
1428
|
script = "\n".join(new_script_lines)
|
q2rad/q2raddb.py
CHANGED
|
@@ -21,7 +21,10 @@ from q2gui.q2model import Q2CursorModel
|
|
|
21
21
|
from q2gui.q2utils import int_, num
|
|
22
22
|
from q2gui import q2app
|
|
23
23
|
from q2gui.q2dialogs import q2Mess, Q2WaitShow
|
|
24
|
-
import html
|
|
24
|
+
# import html
|
|
25
|
+
import datetime
|
|
26
|
+
import calendar
|
|
27
|
+
|
|
25
28
|
|
|
26
29
|
from q2rad import Q2Form
|
|
27
30
|
from q2gui.q2form import NEW, COPY
|
|
@@ -33,7 +36,6 @@ if "darwin" in sys.platform:
|
|
|
33
36
|
import ssl
|
|
34
37
|
|
|
35
38
|
ssl._create_default_https_context = ssl._create_unverified_context
|
|
36
|
-
import datetime
|
|
37
39
|
|
|
38
40
|
# import errno
|
|
39
41
|
|
|
@@ -173,3 +175,23 @@ def today():
|
|
|
173
175
|
def ensure_empty_pk(table="", row={}, q2_db=None):
|
|
174
176
|
q2_db = get_default_db(q2_db)
|
|
175
177
|
q2_db.ensure_empty_pk(table, row)
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
def dtoc(date, format_from="%Y-%m-%d", format_to="%d.%m.%Y"):
|
|
181
|
+
return datetime.datetime.strptime(date, format_from).strftime(format_to)
|
|
182
|
+
|
|
183
|
+
|
|
184
|
+
def ctod(date, format_from="%d.%m.%Y", format_to="%Y-%m-%d"):
|
|
185
|
+
return dtoc(date, format_from, format_to)
|
|
186
|
+
|
|
187
|
+
|
|
188
|
+
def first_day_of_month(date):
|
|
189
|
+
_date = datetime.datetime.strptime(date, "%Y-%m-%d")
|
|
190
|
+
_date = _date.replace(day=1)
|
|
191
|
+
return _date.strftime("%Y-%m-%d")
|
|
192
|
+
|
|
193
|
+
|
|
194
|
+
def last_day_of_month(date):
|
|
195
|
+
_date = datetime.datetime.strptime(date, "%Y-%m-%d")
|
|
196
|
+
_date = _date.replace(day=calendar.monthrange(_date.year, _date.month)[1])
|
|
197
|
+
return _date.strftime("%Y-%m-%d")
|
q2rad/version.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "0.1.
|
|
1
|
+
__version__ = "0.1.225"
|
|
@@ -12,14 +12,14 @@ q2rad/q2market.py,sha256=RNXTNv-fFUgbzBGhHPNXlzGjsAHAtz71BRbTErJarNo,2641
|
|
|
12
12
|
q2rad/q2modules.py,sha256=RwemVJwfxth0lBN4K96tKz62VOW71C7CmmKyhIoH5mc,4632
|
|
13
13
|
q2rad/q2packages.py,sha256=y72L1RAw1OgtKGaL8lJ1KHIaers5I6kTZSiphwwrY0M,3808
|
|
14
14
|
q2rad/q2queries.py,sha256=YYJEpC_0rXAV8W_lx2604yqnkooHzheFmDCfqbW02zY,13203
|
|
15
|
-
q2rad/q2rad.py,sha256=
|
|
16
|
-
q2rad/q2raddb.py,sha256=
|
|
15
|
+
q2rad/q2rad.py,sha256=a9xM_aFwx1HVm2dxkZzZYuFyNYjDN86pjH_BlkI2h10,56438
|
|
16
|
+
q2rad/q2raddb.py,sha256=3Tt2HomjR3RuL-lLvXr5MKxOnvQDI7HzjaLg-Ui8Y10,5342
|
|
17
17
|
q2rad/q2reports.py,sha256=tAOm54_P_NN8nRDsZy8N6vbw0YOTNQ_9xtvT6NMG724,86155
|
|
18
18
|
q2rad/q2stylesettings.py,sha256=rEJLyLzsffJEXnMbg9bPB3KHLjYfw-49QgrtcYOfGV0,4769
|
|
19
19
|
q2rad/q2utils.py,sha256=APe6BIdjDY5B6V_iuy-2oRyh3UPAzc8kJmPZJY5AojA,19767
|
|
20
|
-
q2rad/version.py,sha256=
|
|
21
|
-
q2rad-0.1.
|
|
22
|
-
q2rad-0.1.
|
|
23
|
-
q2rad-0.1.
|
|
24
|
-
q2rad-0.1.
|
|
25
|
-
q2rad-0.1.
|
|
20
|
+
q2rad/version.py,sha256=9mU63Yb8C2TsT1KTi0Kc4trGxd9uSqaVsWJ8b-YbpRs,23
|
|
21
|
+
q2rad-0.1.225.dist-info/entry_points.txt,sha256=DmsJQE6f3wYuhdN2h6ARYxSe8_d03paeepfGpdVj5rs,42
|
|
22
|
+
q2rad-0.1.225.dist-info/LICENSE,sha256=JRR3LlR18ghhYXT4G2cWgXmnxRvcuVcKlqncWWK4MRY,10347
|
|
23
|
+
q2rad-0.1.225.dist-info/METADATA,sha256=0JHs4gVMSV_O_3YVFLGUy0QhCcBCsSlRcYYdsLwbTB4,3369
|
|
24
|
+
q2rad-0.1.225.dist-info/WHEEL,sha256=WGfLGfLX43Ei_YORXSnT54hxFygu34kMpcQdmgmEwCQ,88
|
|
25
|
+
q2rad-0.1.225.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|