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
fb7bd0c4
Unverified
Commit
fb7bd0c4
authored
Jan 18, 2019
by
hexeth
Committed by
GitHub
Jan 18, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1 from hexeth/reader-theme
reader theme
parents
ae55dd6c
3ba9e4d9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
web.py
cps/web.py
+4
-1
No files found.
cps/web.py
View file @
fb7bd0c4
...
@@ -682,6 +682,7 @@ def before_request():
...
@@ -682,6 +682,7 @@ def before_request():
g
.
allow_registration
=
config
.
config_public_reg
g
.
allow_registration
=
config
.
config_public_reg
g
.
allow_upload
=
config
.
config_uploading
g
.
allow_upload
=
config
.
config_uploading
g
.
current_theme
=
config
.
config_theme
g
.
current_theme
=
config
.
config_theme
g
.
current_reader_theme
=
config
.
config_reader_theme
g
.
public_shelfes
=
ub
.
session
.
query
(
ub
.
Shelf
)
.
filter
(
ub
.
Shelf
.
is_public
==
1
)
.
order_by
(
ub
.
Shelf
.
name
)
.
all
()
g
.
public_shelfes
=
ub
.
session
.
query
(
ub
.
Shelf
)
.
filter
(
ub
.
Shelf
.
is_public
==
1
)
.
order_by
(
ub
.
Shelf
.
name
)
.
all
()
if
not
config
.
db_configured
and
request
.
endpoint
not
in
(
'basic_configuration'
,
'login'
)
and
'/static/'
not
in
request
.
path
:
if
not
config
.
db_configured
and
request
.
endpoint
not
in
(
'basic_configuration'
,
'login'
)
and
'/static/'
not
in
request
.
path
:
return
redirect
(
url_for
(
'basic_configuration'
))
return
redirect
(
url_for
(
'basic_configuration'
))
...
@@ -2904,7 +2905,9 @@ def view_configuration():
...
@@ -2904,7 +2905,9 @@ def view_configuration():
if
"config_read_column"
in
to_save
:
if
"config_read_column"
in
to_save
:
content
.
config_read_column
=
int
(
to_save
[
"config_read_column"
])
content
.
config_read_column
=
int
(
to_save
[
"config_read_column"
])
if
"config_theme"
in
to_save
:
if
"config_theme"
in
to_save
:
content
.
config_theme
=
int
(
to_save
[
"config_theme"
])
content
.
config_theme
=
int
(
to_save
[
"config_reader_theme"
])
if
"config_reader_theme"
in
to_save
:
content
.
config_reader_theme
=
int
(
to_save
[
"config_reader_theme"
])
if
"config_title_regex"
in
to_save
:
if
"config_title_regex"
in
to_save
:
if
content
.
config_title_regex
!=
to_save
[
"config_title_regex"
]:
if
content
.
config_title_regex
!=
to_save
[
"config_title_regex"
]:
content
.
config_title_regex
=
to_save
[
"config_title_regex"
]
content
.
config_title_regex
=
to_save
[
"config_title_regex"
]
...
...
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