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 f34bd454
authored
Oct 21, 2025
by
aa.gustiana@gmail.com
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Refactor CaptchaWidget serialization to always generate captcha and simplify cstruct assignment
1 parent
618de55d
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
opensipkd/base/widgets/widget_os.py
opensipkd/base/widgets/widget_os.py
View file @
f34bd45
...
@@ -378,11 +378,12 @@ class CaptchaWidget(Widget):
...
@@ -378,11 +378,12 @@ class CaptchaWidget(Widget):
def
serialize
(
self
,
field
,
cstruct
,
**
kw
):
def
serialize
(
self
,
field
,
cstruct
,
**
kw
):
file_name
=
""
file_name
=
""
if
not
cstruct
:
#
if not cstruct:
kode_captcha
,
file_name
=
img_captcha
(
self
.
request
)
kode_captcha
,
file_name
=
img_captcha
(
self
.
request
)
self
.
request
.
session
[
"captcha"
]
=
kode_captcha
self
.
request
.
session
[
"captcha"
]
=
kode_captcha
cstruct
=
cstruct
or
self
.
url
+
file_name
# cstruct = cstruct or self.url+file_name
cstruct
=
self
.
url
+
file_name
readonly
=
kw
.
get
(
"readonly"
,
self
.
readonly
)
readonly
=
kw
.
get
(
"readonly"
,
self
.
readonly
)
template
=
readonly
and
self
.
readonly_template
or
self
.
template
template
=
readonly
and
self
.
readonly_template
or
self
.
template
values
=
self
.
get_template_values
(
field
,
cstruct
,
kw
)
values
=
self
.
get_template_values
(
field
,
cstruct
,
kw
)
...
...
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