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 1c9f3ec4
authored
Jul 02, 2022
by
aagusti
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
prebaikan report
1 parent
2daa1056
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
9 deletions
opensipkd/base/views/user.py
opensipkd/base/views/user.py
View file @
1c9f3ec
...
...
@@ -66,9 +66,6 @@ class Views(BaseView):
@view_config
(
route_name
=
'user-act'
,
renderer
=
'json'
,
permission
=
'user-view'
)
def
view_act
(
self
):
return
super
(
Views
,
self
)
.
view_act
()
def
next_act
(
self
):
url_dict
=
self
.
req
.
matchdict
if
url_dict
[
'act'
]
==
'csv'
:
query
=
query_register
()
...
...
@@ -97,11 +94,12 @@ class Views(BaseView):
base_path
=
base_path
)
filename
=
os
.
path
.
basename
(
filename
)
resp
=
pdf_response
(
self
.
req
,
pdf
,
filename
)
# save_file = SaveFile('/tmp')
# r = save_file.save(pdf, filename=filename)
# resp = file_response(self.req, filename=r)
if
resp
.
content_length
<
10
:
resp
.
content_length
=
len
(
resp
.
body
)
return
resp
return
super
(
Views
,
self
)
.
view_act
()
def
form_validator
(
self
,
form
,
value
):
if
"company_id"
in
value
and
not
value
[
"company_id"
]:
value
[
"company_id"
]
=
None
...
...
@@ -159,9 +157,6 @@ class Views(BaseView):
add_member_count
(
gid
)
return
row
def
after_add
(
self
,
row
,
values
):
pass
@view_config
(
route_name
=
'user-add'
,
renderer
=
'templates/form.pt'
,
permission
=
'user-view'
)
...
...
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