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 dadf7be9
authored
Feb 04, 2025
by
pbbm2
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
perbaikan param get id card
1 parent
7537dfaa
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
opensipkd/base/__init__.py
opensipkd/base/__init__.py
View file @
dadf7be
...
@@ -222,15 +222,15 @@ def get_ini_params(request, params=None, alternate=None, settings=None):
...
@@ -222,15 +222,15 @@ def get_ini_params(request, params=None, alternate=None, settings=None):
return
get_params
(
params
,
alternate
,
settings
)
return
get_params
(
params
,
alternate
,
settings
)
def
get_id_card_folder
(
ext
=
None
):
def
get_id_card_folder
(
ext
=
None
,
settings
=
None
):
folder
=
get_params
(
"partner_idcard_folder"
,
'/tmp/idcard'
)
folder
=
get_params
(
"partner_idcard_folder"
,
'/tmp/idcard'
,
settings
=
settings
)
if
ext
:
if
ext
:
if
ext
and
os
.
sep
!=
'/'
:
if
ext
and
os
.
sep
!=
'/'
:
ext
=
ext
.
replace
(
'/'
,
'
\\
'
)
ext
=
ext
.
replace
(
'/'
,
'
\\
'
)
if
not
os
.
path
.
exists
(
folder
+
ext
):
if
not
os
.
path
.
exists
(
folder
+
ext
):
os
.
makedirs
(
folder
+
ext
)
os
.
makedirs
(
folder
+
ext
)
log
.
info
(
f
"IDCard Folder: {folder+ext}"
)
return
folder
+
ext
return
folder
+
ext
log
.
debug
(
"IDCard Folder: {folder}"
)
return
folder
return
folder
...
@@ -604,8 +604,9 @@ def get_config(settings):
...
@@ -604,8 +604,9 @@ def get_config(settings):
config
.
add_static_view
(
'static'
,
'opensipkd.base:static'
,
config
.
add_static_view
(
'static'
,
'opensipkd.base:static'
,
cache_max_age
=
3600
)
cache_max_age
=
3600
)
config
.
add_static_view
(
partner_idcard_url
,
config
.
add_static_view
(
partner_idcard_url
,
get_id_card_folder
(
"/"
),
get_id_card_folder
(
"/"
,
settings
=
settings
),
cache_max_age
=
3600
)
cache_max_age
=
3600
)
config
.
add_static_view
(
'deform_static'
,
'deform:static'
)
config
.
add_static_view
(
'deform_static'
,
'deform:static'
)
captcha_files
=
get_params
(
'captcha_files'
,
settings
=
settings
,
captcha_files
=
get_params
(
'captcha_files'
,
settings
=
settings
,
...
...
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