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 75a77185
authored
Mar 18, 2025
by
Taufikyu
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
perbaiki defered_jenis, dan validator
1 parent
7f38fee3
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
3 deletions
opensipkd/base/views/__init__.py
opensipkd/base/views/partner_base.py
opensipkd/base/views/__init__.py
View file @
75a7718
...
...
@@ -4,6 +4,7 @@ from datetime import timedelta
import
colander
from
deform
import
(
Form
,
ValidationFailure
,
widget
,
Button
,
FileData
)
from
deform.widget
import
RadioChoiceWidget
from
opensipkd.base
import
get_params
,
get_urls
from
opensipkd.models
import
(
DBSession
,
UserService
,
)
...
...
@@ -167,8 +168,9 @@ def view_password(request):
one_hour
=
timedelta
(
1.0
/
24
)
two_minutes
=
timedelta
(
1.0
/
24
/
60
)
from
deform
import
widget
@colander.deferred
def
deferred_jenis
(
node
,
kw
):
values
=
kw
.
get
(
'daftar_jenis'
,
[])
return
widget
.
RadioChoiceWidget
(
values
=
values
)
\ No newline at end of file
return
RadioChoiceWidget
(
values
=
values
)
\ No newline at end of file
opensipkd/base/views/partner_base.py
View file @
75a7718
...
...
@@ -40,7 +40,7 @@ class PartnerEmailValidator(colander.Email, Validator):
@colander.deferred
def
partner_email_validator
(
node
,
kw
):
return
PartnerEmailValidator
(
kw
[
'row'
]
)
return
PartnerEmailValidator
(
kw
.
get
(
'row'
,
''
)
)
class
PartnerKodeValidator
(
Validator
):
...
...
@@ -65,7 +65,7 @@ class PartnerKodeValidator(Validator):
@colander.deferred
def
partner_kode_validator
(
node
,
kw
):
return
PartnerKodeValidator
(
kw
[
'row'
]
)
return
PartnerKodeValidator
(
kw
.
get
(
'row'
,
''
)
)
class
NamaSchema
(
colander
.
Schema
):
...
...
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