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 89d5ff08
authored
Apr 17, 2022
by
aa.gusti
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
detable
1 parent
fd9d25a0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
44 additions
and
0 deletions
CHANGES.txt
docs/detable.md
CHANGES.txt
View file @
89d5ff0
3.0.1 25-04-2022
Penambahan Feature ```detable```
3.0.0 26-08-2021
3.0.0 26-08-2021
1. Penghapusan folder src
1. Penghapusan folder src
2. Perubahan ke base ciamis
2. Perubahan ke base ciamis
...
...
docs/detable.md
0 → 100644
View file @
89d5ff0
# DeTable
Feature yang digunakan untuk memudahkan merender datatable dalam html
```
python
import
colander
from
opensipkd.detable
import
DeTable
from
opensipkd.tools.buttons
import
btn_view
,
btn_add
,
btn_edit
,
btn_delete
,
btn_close
class
ListSchema
(
colander
.
Schema
):
id
=
colander
.
SchemaNode
(
colander
.
Integer
(),
searchable
=
False
,
orderable
=
False
,
visible
=
False
)
kode
=
colander
.
SchemaNode
(
colander
.
String
(),
width
=
'100pt'
)
nama
=
colander
.
SchemaNode
(
colander
.
String
())
@view_config
(
route_name
=
'provinsi'
,
renderer
=
'templates/list.pt'
,
permission
=
'provinsi'
)
def
view_list
(
self
):
table
=
DeTable
(
ListSchema
(),
action
=
f
"{self.home}/provinsi"
,
buttons
=
(
btn_view
,
btn_add
,
btn_edit
,
btn_delete
,
btn_close
))
return
dict
(
table
=
table
.
render
(),
scripts
=
""
)
```
## DeTable Parameter
Lihat di deklarasi
`class DeTable(field.Field):`
## SchemaNode Items
```
python
colander.SchemaNode(
NodeType, -> colander.Integer(), colander.String()
searchable=False,
orderable=False,
visible=False,
width="20pt",
thousands=dict(separator='.', decimal=',', point=2) (not implemented),
widget=widget (not implemented)
)
\ No newline at end of file
\ No newline at end of file
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