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 886da337
authored
Sep 23, 2021
by
aa.gusti
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
change password
1 parent
525124bc
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
2 deletions
opensipkd/base/views/templates/change-password.pt
opensipkd/base/views/user_login.py
setup.py
opensipkd/base/views/templates/change-password.pt
0 → 100644
View file @
886da33
<div metal:use-macro="load: main.pt">
<div metal:fill-slot="content">
<div tal:content="structure form"/>
</div>
</div>
opensipkd/base/views/user_login.py
View file @
886da33
...
...
@@ -200,7 +200,7 @@ def change_password_validator(form, value):
@view_config
(
route_name
=
'change-password'
,
renderer
=
'templates/change-password.pt'
)
def
view_change_password
(
request
):
if
request
.
authenticated_userid
(
request
)
:
if
request
.
authenticated_userid
:
request
.
session
.
flash
(
'Anda sudah login'
,
'error'
)
return
HTTPFound
(
location
=
f
"{request.route_url('home')}"
)
schema
=
ChangePassword
(
validator
=
change_password_validator
)
...
...
@@ -300,7 +300,7 @@ def send_email_security_code(
# if 'base_url' not in settings:
# return
url
=
'{}
/
password/{}'
.
format
(
url
=
'{}password/{}'
.
format
(
request
.
route_url
(
'home'
),
user
.
security_code
)
minutes
=
int
(
time_remain
.
seconds
/
60
)
data
=
dict
(
url
=
url
,
minutes
=
minutes
)
...
...
setup.py
View file @
886da33
...
...
@@ -66,6 +66,7 @@ setup(
'base/reports/*.*'
,
'base/alembic/*.*'
,
'base/alembic/versions/*.*'
,
'base/views/*.tpl'
,
],},
data_files
=
[(
'etc'
,[
'etc/live_opensipkd.tpl'
,
'etc/test_opensipkd.tpl'
,])],
...
...
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