Commit 08fe1794 by aagusti

local

1 parent bfb2bf8f
This diff could not be displayed because it is too large.
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```
......
...@@ -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
......
...@@ -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(
......
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 _
......
...@@ -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)
......
...@@ -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',
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!