Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
D
douban-api-proxy
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
captainwong
douban-api-proxy
Commits
ed459ddb
Commit
ed459ddb
authored
Feb 15, 2017
by
OzzieIsaacs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bugfix display of commit date
parent
93b19165
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
web.py
cps/web.py
+5
-5
No files found.
cps/web.py
View file @
ed459ddb
...
@@ -1577,9 +1577,10 @@ def profile():
...
@@ -1577,9 +1577,10 @@ def profile():
@
login_required
@
login_required
@
admin_required
@
admin_required
def
admin
():
def
admin
():
commit
=
'$Format:
%
cI$'
content
=
ub
.
session
.
query
(
ub
.
User
)
.
all
()
content
=
ub
.
session
.
query
(
ub
.
User
)
.
all
()
settings
=
ub
.
session
.
query
(
ub
.
Settings
)
.
first
()
settings
=
ub
.
session
.
query
(
ub
.
Settings
)
.
first
()
return
render_title_template
(
"admin.html"
,
content
=
content
,
email
=
settings
,
config
=
config
,
return
render_title_template
(
"admin.html"
,
content
=
content
,
email
=
settings
,
config
=
config
,
commit
=
commit
,
development
=
ub
.
DEVELOPMENT
,
title
=
_
(
u"Admin page"
))
development
=
ub
.
DEVELOPMENT
,
title
=
_
(
u"Admin page"
))
...
@@ -1598,7 +1599,6 @@ def basic_configuration():
...
@@ -1598,7 +1599,6 @@ def basic_configuration():
def
configuration_helper
(
origin
):
def
configuration_helper
(
origin
):
global
global_task
global
global_task
commit
=
'$Format:
%
cI$'
reboot_required
=
False
reboot_required
=
False
db_change
=
False
db_change
=
False
success
=
False
success
=
False
...
@@ -1659,13 +1659,13 @@ def configuration_helper(origin):
...
@@ -1659,13 +1659,13 @@ def configuration_helper(origin):
logging
.
getLogger
(
"book_formats"
)
.
setLevel
(
config
.
config_log_level
)
logging
.
getLogger
(
"book_formats"
)
.
setLevel
(
config
.
config_log_level
)
except
e
:
except
e
:
flash
(
e
,
category
=
"error"
)
flash
(
e
,
category
=
"error"
)
return
render_title_template
(
"config_edit.html"
,
content
=
config
,
origin
=
origin
,
commit
=
commit
,
return
render_title_template
(
"config_edit.html"
,
content
=
config
,
origin
=
origin
,
title
=
_
(
u"Basic Configuration"
))
title
=
_
(
u"Basic Configuration"
))
if
db_change
:
if
db_change
:
reload
(
db
)
reload
(
db
)
if
not
db
.
setup_db
():
if
not
db
.
setup_db
():
flash
(
_
(
u'DB location is not valid, please enter correct path'
),
category
=
"error"
)
flash
(
_
(
u'DB location is not valid, please enter correct path'
),
category
=
"error"
)
return
render_title_template
(
"config_edit.html"
,
content
=
config
,
origin
=
origin
,
commit
=
commit
,
return
render_title_template
(
"config_edit.html"
,
content
=
config
,
origin
=
origin
,
title
=
_
(
u"Basic Configuration"
))
title
=
_
(
u"Basic Configuration"
))
if
reboot_required
:
if
reboot_required
:
# db.engine.dispose() # ToDo verify correct
# db.engine.dispose() # ToDo verify correct
...
@@ -1678,7 +1678,7 @@ def configuration_helper(origin):
...
@@ -1678,7 +1678,7 @@ def configuration_helper(origin):
app
.
logger
.
info
(
'Reboot required, restarting'
)
app
.
logger
.
info
(
'Reboot required, restarting'
)
if
origin
:
if
origin
:
success
=
True
success
=
True
return
render_title_template
(
"config_edit.html"
,
origin
=
origin
,
success
=
success
,
content
=
config
,
commit
=
commit
,
return
render_title_template
(
"config_edit.html"
,
origin
=
origin
,
success
=
success
,
content
=
config
,
title
=
_
(
u"Basic Configuration"
))
title
=
_
(
u"Basic Configuration"
))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment