Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
irul
/
opensipkd-base
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 8c9d0f6d
authored
Feb 28, 2023
by
aagusti
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
perbaikan model
1 parent
32befca7
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
6 deletions
opensipkd/base/alembic/README
opensipkd/base/views/base_views.py
opensipkd/base/views/templates/_table_include.pt
opensipkd/base/alembic/README
View file @
8c9d0f6
Generic single-database configuration.
\ No newline at end of file
\ No newline at end of file
Generic single-database configuration.
alembic -c config -n section_name revision -m "notes "
\ No newline at end of file
\ No newline at end of file
opensipkd/base/views/base_views.py
View file @
8c9d0f6
...
@@ -185,11 +185,19 @@ class BaseView(object):
...
@@ -185,11 +185,19 @@ class BaseView(object):
bindings
=
kwargs
[
"bindings"
]
bindings
=
kwargs
[
"bindings"
]
else
:
else
:
bindings
=
self
.
bindings
bindings
=
self
.
bindings
form_params
=
{}
# form_params["after_bind"] = after_bind
if
"validator"
in
kwargs
and
kwargs
[
"validator"
]:
if
"validator"
in
kwargs
and
kwargs
[
"validator"
]:
schema
=
class_form
(
validator
=
kwargs
[
"validator"
])
form_params
[
"validator"
]
=
kwargs
[
"validator"
]
# schema = class_form(validator=kwargs["validator"])
else
:
else
:
schema
=
class_form
(
validator
=
self
.
form_validator
)
form_params
[
"validator"
]
=
self
.
form_validator
# schema = class_form(validator=self.form_validator)
if
"after_bind"
in
kwargs
and
kwargs
[
"after_bind"
]:
form_params
[
"after_bind"
]
=
kwargs
[
"after_bind"
]
# schema = class_form(validator=kwargs["validator"])
schema
=
class_form
(
**
form_params
)
schema
=
schema
.
bind
(
request
=
self
.
req
,
**
bindings
)
schema
=
schema
.
bind
(
request
=
self
.
req
,
**
bindings
)
schema
.
request
=
self
.
req
schema
.
request
=
self
.
req
...
@@ -400,8 +408,8 @@ class BaseView(object):
...
@@ -400,8 +408,8 @@ class BaseView(object):
# for k, v in e.cstruct.items():
# for k, v in e.cstruct.items():
# log.debug(hasattr(e.field, k))
# log.debug(hasattr(e.field, k))
# if isinstance(f, colander.Date):
# if isinstance(f, colander.Date):
# e.cstruct[f] = date_from_str(e.cstruct[f])
# e.cstruct[f] = date_from_str(e.cstruct[f])
return
dict
(
form
=
form
.
render
(
e
.
cstruct
),
return
dict
(
form
=
form
.
render
(
e
.
cstruct
),
table
=
table
and
table
.
render
()
or
None
,
table
=
table
and
table
.
render
()
or
None
,
...
...
opensipkd/base/views/templates/_table_include.pt
0 → 100644
View file @
8c9d0f6
<script src="${home}/static/v3/js/plugin/datatables/jquery.dataTables.min.js"></script>
<script src="${home}/static/v3/js/plugin/datatables/dataTables.colVis.min.js"></script>
<script src="${home}/static/v3/js/plugin/datatables/dataTables.tableTools.min.js"></script>
<script src="${home}/static/v3/js/plugin/datatables/dataTables.bootstrap.min.js"></script>
<script src="${home}/static/v3/js/plugin/datatable-responsive/datatables.responsive.min.js"></script>
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