Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Project
/
eis_sipkd
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 18d76537
authored
May 30, 2017
by
aa.gusti
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
model-chart
1 parent
7b4623b0
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
20 additions
and
6 deletions
models/__init__.py
models/__pycache__/__init__.cpython-34.pyc
models/__pycache__/eis.cpython-34.pyc
models/eis.py
views/eis_chart.py
views/eis_chart_item.py
models/__init__.py
View file @
18d7653
...
@@ -73,4 +73,4 @@ class NamaModel(KodeModel):
...
@@ -73,4 +73,4 @@ class NamaModel(KodeModel):
def
query_nama
(
cls
,
nama
):
def
query_nama
(
cls
,
nama
):
return
cls
.
query
()
.
filter_by
(
nama
=
nama
)
return
cls
.
query
()
.
filter_by
(
nama
=
nama
)
from
.eis
import
Eis
,
Slide
,
Chart
,
ChartItem
,
LastUpdate
\ No newline at end of file
\ No newline at end of file
from
.eis
import
Eis
,
Slide
,
Chart
,
ChartItem
,
EisParams
,
ArPayment
,
LastUpdate
\ No newline at end of file
\ No newline at end of file
models/__pycache__/__init__.cpython-34.pyc
View file @
18d7653
No preview for this file type
models/__pycache__/eis.cpython-34.pyc
View file @
18d7653
No preview for this file type
models/eis.py
View file @
18d7653
...
@@ -99,6 +99,20 @@ class ChartItem(NamaModel, EisBase):
...
@@ -99,6 +99,20 @@ class ChartItem(NamaModel, EisBase):
__table_args__
=
(
UniqueConstraint
(
'kode'
),
__table_args__
=
(
UniqueConstraint
(
'kode'
),
TABLE_ARGS
)
TABLE_ARGS
)
class
EisParams
(
NamaModel
,
EisBase
):
__tablename__
=
'params'
last_update
=
Column
(
DateTime
(
timezone
=
False
),
nullable
=
True
)
__table_args__
=
(
TABLE_ARGS
)
class
LastUpdate
(
DefaultModel
,
EisBase
):
class
LastUpdate
(
DefaultModel
,
EisBase
):
__tablename__
=
'last_update'
__tablename__
=
'last_update'
wells
=
Column
(
DateTime
(
timezone
=
True
),
nullable
=
True
)
wells
=
Column
(
DateTime
(
timezone
=
False
),
nullable
=
True
)
__table_args__
=
(
TABLE_ARGS
)
class
ArPayment
(
NamaModel
,
EisBase
):
__tablename__
=
'ar_payment'
tanggal
=
Column
(
DateTime
(
timezone
=
False
))
denda
=
Column
(
BigInteger
)
bayar
=
Column
(
BigInteger
)
__table_args__
=
(
UniqueConstraint
(
'tanggal'
,
'kode'
),
TABLE_ARGS
)
\ No newline at end of file
\ No newline at end of file
views/eis_chart.py
View file @
18d7653
...
@@ -141,15 +141,15 @@ class view_eis_chart(BaseView):
...
@@ -141,15 +141,15 @@ class view_eis_chart(BaseView):
def
session_failed
(
self
,
session_name
):
def
session_failed
(
self
,
session_name
):
r
=
dict
(
form
=
self
.
ses
sion
[
session_name
])
r
=
dict
(
form
=
self
.
ses
[
session_name
])
del
self
.
ses
sion
[
session_name
]
del
self
.
ses
[
session_name
]
return
r
return
r
@view_config
(
route_name
=
'eis-chart-add'
,
renderer
=
'templates/eis-chart/add.pt'
,
@view_config
(
route_name
=
'eis-chart-add'
,
renderer
=
'templates/eis-chart/add.pt'
,
permission
=
'add'
)
permission
=
'add'
)
def
view_eis_chart_add
(
self
):
def
view_eis_chart_add
(
self
):
req
=
self
.
req
req
=
self
.
req
ses
=
self
.
ses
sion
ses
=
self
.
ses
form
=
self
.
get_form
(
AddSchema
)
form
=
self
.
get_form
(
AddSchema
)
if
req
.
POST
:
if
req
.
POST
:
if
'simpan'
in
req
.
POST
:
if
'simpan'
in
req
.
POST
:
...
...
views/eis_chart_item.py
View file @
18d7653
...
@@ -224,7 +224,7 @@ class view_eis_chart_item(BaseView):
...
@@ -224,7 +224,7 @@ class view_eis_chart_item(BaseView):
permission
=
'add'
)
permission
=
'add'
)
def
view_eis_chart_item_add
(
self
):
def
view_eis_chart_item_add
(
self
):
req
=
self
.
req
req
=
self
.
req
ses
=
self
.
ses
sion
ses
=
self
.
ses
form
=
self
.
get_form
(
AddSchema
)
form
=
self
.
get_form
(
AddSchema
)
chart_id
=
req
.
matchdict
[
'chart_id'
]
chart_id
=
req
.
matchdict
[
'chart_id'
]
if
req
.
POST
:
if
req
.
POST
:
...
...
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