Skip to content
GitLab
Explore
Sign in
Commits on Source (3)
Change the admin default home-page
· 2833e84e
Marco De Donno
authored
Dec 24, 2019
2833e84e
Move the index.html page to the base view
· 1392699c
Marco De Donno
authored
Dec 27, 2019
1392699c
Remove useless variables
· 428ff7fc
Marco De Donno
authored
Dec 30, 2019
428ff7fc
Hide whitespace changes
Inline
Side-by-side
views/base/__init__.py
View file @
428ff7fc
...
...
@@ -10,7 +10,7 @@ import utils
from
utils.decorator
import
login_required
from
utils.template
import
my_render_template
base_view
=
Blueprint
(
"
base
"
,
__name__
)
base_view
=
Blueprint
(
"
base
"
,
__name__
,
template_folder
=
"
templates
"
)
@base_view.route
(
"
/
"
)
@login_required
...
...
@@ -28,5 +28,8 @@ def home():
elif
session
[
"
account_type_name
"
]
==
"
Submitter
"
:
return
redirect
(
url_for
(
"
submission.submission_list
"
)
)
elif
session
[
"
account_type_name
"
]
==
"
Administrator
"
:
return
redirect
(
url_for
(
"
submission.admin_submission_list
"
)
)
else
:
return
my_render_template
(
"
index.html
"
)
templates/index.html
→
views/base/
templates/index.html
View file @
428ff7fc
File moved
views/images/__init__.py
View file @
428ff7fc
...
...
@@ -261,7 +261,6 @@ def do_image_tenprint_segmentation( tenprint_id ):
value
=
"
{}...
"
.
format
(
value
[
0
:
20
]
)
current_app
.
logger
.
debug
(
"
{}: {}
"
.
format
(
key
,
value
)
)
res
=
img
[
"
resolution
"
]
img_format
=
img
[
"
format
"
]
side
=
{
1
:
"
front
"
,
...
...
views/newuser/__init__.py
View file @
428ff7fc
...
...
@@ -380,7 +380,7 @@ def do_config_new_user():
password
=
utils
.
hash
.
pbkdf2
(
password
,
utils
.
rand
.
random_data
(
config
.
EMAIL_SALT_LENGTH
),
config
.
PASSWORD_NB_ITERATIONS
).
hash
()
q
=
config
.
db
.
query
(
"
UPDATE users SET password = %s WHERE username = %s
"
,
(
password
,
username
,
)
)
config
.
db
.
query
(
"
UPDATE users SET password = %s WHERE username = %s
"
,
(
password
,
username
,
)
)
config
.
db
.
commit
()
session
[
"
username
"
]
=
username
...
...