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 040be38b
authored
Nov 06, 2025
by
aa.gustiana@gmail.com
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Add deprecated_base module and update request methods in __init__.py
1 parent
4c02c8c9
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
34 additions
and
5 deletions
opensipkd/base/__init__.py
opensipkd/base/depreciated_base.py
opensipkd/base/views/api_base.py
opensipkd/base/__init__.py
View file @
040be38
...
@@ -240,6 +240,9 @@ def google_signin_client_id(request):
...
@@ -240,6 +240,9 @@ def google_signin_client_id(request):
return
ids
[
0
]
.
strip
()
return
ids
[
0
]
.
strip
()
return
''
return
''
from
.depreciated_base
import
(
get_company
,
get_departement
,
get_ibukota
,
get_address
,
get_address2
)
def
get_config
(
settings
):
def
get_config
(
settings
):
session_factory
=
session_factory_from_settings
(
settings
)
session_factory
=
session_factory_from_settings
(
settings
)
...
@@ -257,10 +260,10 @@ def get_config(settings):
...
@@ -257,10 +260,10 @@ def get_config(settings):
config
.
add_request_method
(
get_company
,
'company'
,
reify
=
True
)
config
.
add_request_method
(
get_company
,
'company'
,
reify
=
True
)
config
.
add_request_method
(
get_user
,
'user'
,
reify
=
True
)
config
.
add_request_method
(
get_user
,
'user'
,
reify
=
True
)
#
config.add_request_method(get_departement, 'departement', reify=True)
config
.
add_request_method
(
get_departement
,
'departement'
,
reify
=
True
)
#
config.add_request_method(get_ibukota, 'ibukota', reify=True)
config
.
add_request_method
(
get_ibukota
,
'ibukota'
,
reify
=
True
)
#
config.add_request_method(get_address, 'address', reify=True)
config
.
add_request_method
(
get_address
,
'address'
,
reify
=
True
)
#
config.add_request_method(get_address2, 'address2', reify=True)
config
.
add_request_method
(
get_address2
,
'address2'
,
reify
=
True
)
# config.add_request_method(get_modules, 'modules', reify=True)
# config.add_request_method(get_modules, 'modules', reify=True)
config
.
add_request_method
(
has_modules
,
'has_modules'
,
reify
=
True
)
config
.
add_request_method
(
has_modules
,
'has_modules'
,
reify
=
True
)
...
...
opensipkd/base/depreciated_base.py
0 → 100644
View file @
040be38
from
opensipkd.base
import
get_params
def
get_company
(
request
):
return
get_params
(
'company'
,
'openSIPKD'
)
.
upper
()
def
get_departement
(
request
):
return
get_params
(
'departement'
,
'DEPARTEMEN INFORMATION TEKNOLOGI'
)
.
upper
()
def
get_ibukota
(
request
):
return
get_params
(
'ibukota'
,
'BEKASI'
)
def
get_address
(
request
):
return
get_params
(
'address_1'
,
'ALAMAT DEPARTEMEN BARIS 1'
)
def
get_address2
(
request
):
return
get_params
(
'address_2'
,
'ALAMAT DEPARTEMEN BARIS 2'
)
def
get_app_name
(
request
):
return
get_params
(
'app_name'
,
'openSIPKD Application'
)
opensipkd/base/views/api_base.py
View file @
040be38
...
@@ -133,7 +133,7 @@ class ApiViews(APIView):
...
@@ -133,7 +133,7 @@ class ApiViews(APIView):
# d[k] =f'<a href="{link}" target="_blank">View</a>'
# d[k] =f'<a href="{link}" target="_blank">View</a>'
if
result
.
get
(
"error"
):
if
result
.
get
(
"error"
):
_log
.
error
(
result
.
get
(
"error"
))
_log
.
error
(
result
.
get
(
"error"
))
_log
.
error
(
str
(
result
))
#
_log.error(str(result))
return
result
return
result
def
not_found
(
self
,
msg
=
None
):
def
not_found
(
self
,
msg
=
None
):
...
...
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