Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
aa.gusti
/
opensipkd-base
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Settings
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 08fe1794
authored
Nov 20, 2023
by
aagusti
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
local
1 parent
bfb2bf8f
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
15 additions
and
7 deletions
.vscode/PythonImportHelper-v2-Completion.json
CHANGES.txt
opensipkd/base/__init__.py
opensipkd/base/views/partner.py
opensipkd/base/views/widget_os.py
opensipkd/models/base.py
setup.py
.vscode/PythonImportHelper-v2-Completion.json
0 → 100644
View file @
08fe179
This diff could not be displayed because it is too large.
CHANGES.txt
View file @
08fe179
3.0.2 13-07-2023
Perubahan Colander>2.0
Perubahan SQLAlchemy>2.0
beaker>=1.12.1
3.0.1 25-04-2022
3.0.1 25-04-2022
Penambahan Feature ```detable```
Penambahan Feature ```detable```
...
...
opensipkd/base/__init__.py
View file @
08fe179
...
@@ -425,7 +425,7 @@ def main(global_config, **settings):
...
@@ -425,7 +425,7 @@ def main(global_config, **settings):
"""
"""
engine
=
engine_from_config
(
engine
=
engine_from_config
(
settings
,
'sqlalchemy.'
,
client_encoding
=
'utf8'
,
convert_unicode
=
True
)
settings
,
'sqlalchemy.'
,
client_encoding
=
'utf8'
)
#, convert_unicode=True
DBSession
.
configure
(
bind
=
engine
)
DBSession
.
configure
(
bind
=
engine
)
LogDBSession
.
configure
(
bind
=
engine
)
LogDBSession
.
configure
(
bind
=
engine
)
Base
.
metadata
.
bind
=
engine
Base
.
metadata
.
bind
=
engine
...
...
opensipkd/base/views/partner.py
View file @
08fe179
...
@@ -30,11 +30,13 @@ SESS_EDIT_FAILED = 'Edit partner gagal'
...
@@ -30,11 +30,13 @@ SESS_EDIT_FAILED = 'Edit partner gagal'
class
AddSchema
(
PartnerSchema
):
class
AddSchema
(
PartnerSchema
):
is_vendor
=
colander
.
SchemaNode
(
is_vendor
=
colander
.
SchemaNode
(
colander
.
Boolean
(),
colander
.
Integer
(),
widget
=
widget
.
CheckboxWidget
(
true_val
=
"1"
,
false_val
=
"0"
),
oid
=
"is_vendor"
,
oid
=
"is_vendor"
,
title
=
"Vendor"
)
title
=
"Vendor"
)
is_customer
=
colander
.
SchemaNode
(
is_customer
=
colander
.
SchemaNode
(
colander
.
Boolean
(),
colander
.
Integer
(),
widget
=
widget
.
CheckboxWidget
(
true_val
=
"1"
,
false_val
=
"0"
),
oid
=
"is_customer"
,
oid
=
"is_customer"
,
title
=
"Customer"
)
title
=
"Customer"
)
company_id
=
colander
.
SchemaNode
(
company_id
=
colander
.
SchemaNode
(
...
...
opensipkd/base/views/widget_os.py
View file @
08fe179
import
json
import
json
import
logging
import
logging
from
colander
import
SchemaNode
,
null
,
Mapping
,
Invalid
,
string_types
from
colander
import
SchemaNode
,
null
,
Mapping
,
Invalid
#
, string_types
from
deform.widget
import
Widget
,
_StrippedString
,
Select2Widget
,
default_resources
,
\
from
deform.widget
import
Widget
,
_StrippedString
,
Select2Widget
,
default_resources
,
\
ResourceRegistry
,
default_resource_registry
ResourceRegistry
,
default_resource_registry
from
deform.widget
import
string_types
from
iso8601.iso8601
import
ISO8601_REGEX
from
iso8601.iso8601
import
ISO8601_REGEX
from
deform.i18n
import
_
from
deform.i18n
import
_
...
...
opensipkd/models/base.py
View file @
08fe179
...
@@ -12,8 +12,8 @@ from sqlalchemy import inspect as sa_inspect
...
@@ -12,8 +12,8 @@ from sqlalchemy import inspect as sa_inspect
class
MySession
(
Session
):
class
MySession
(
Session
):
def
execute
(
self
,
clause
,
params
=
None
,
mapper
=
None
,
**
kw
):
def
execute
(
self
,
clause
,
params
=
None
,
mapper
=
None
,
**
kw
):
# Your magic with clause here
# Your magic with clause here
#
print("Session:", clause, params, mapper, kw)
print
(
"Session:"
,
clause
,
params
,
mapper
,
kw
)
return
Session
.
execute
(
self
,
clause
,
params
,
mapper
)
return
Session
.
execute
(
self
,
clause
,
params
)
#, mapper
session_factory
=
sessionmaker
(
class_
=
MySession
)
session_factory
=
sessionmaker
(
class_
=
MySession
)
...
...
setup.py
View file @
08fe179
...
@@ -11,6 +11,7 @@ line = CHANGES.splitlines()[0]
...
@@ -11,6 +11,7 @@ line = CHANGES.splitlines()[0]
version
=
line
.
split
()[
0
]
version
=
line
.
split
()[
0
]
requires
=
[
requires
=
[
'wheel'
,
'wheel'
,
'colander'
,
'pyramid'
,
'pyramid'
,
'pyramid_tm'
,
'pyramid_tm'
,
'SQLAlchemy'
,
'SQLAlchemy'
,
...
@@ -21,7 +22,7 @@ requires = [
...
@@ -21,7 +22,7 @@ requires = [
'ziggurat-foundations'
,
'ziggurat-foundations'
,
'zope.sqlalchemy'
,
'zope.sqlalchemy'
,
'pytz'
,
'pytz'
,
'deform
>= 2.0a2
'
,
'deform'
,
'psycopg2-binary'
,
'psycopg2-binary'
,
'pyramid_chameleon'
,
'pyramid_chameleon'
,
'pyramid_rpc'
,
'pyramid_rpc'
,
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment