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
273572f4
Commit
273572f4
authored
May 13, 2020
by
Ozzieisaacs
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into Develop
# Conflicts: # cps/ub.py
parents
0cc2b492
ac37483d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
1 deletion
+8
-1
admin.py
cps/admin.py
+1
-1
email_edit.html
cps/templates/email_edit.html
+2
-0
ub.py
cps/ub.py
+5
-0
No files found.
cps/admin.py
View file @
273572f4
...
...
@@ -969,7 +969,7 @@ def reset_user_password(user_id):
if
current_user
is
not
None
and
current_user
.
is_authenticated
:
ret
,
message
=
reset_password
(
user_id
)
if
ret
==
1
:
log
.
debug
(
u"Password for user
%
(user)
s reset"
,
user
=
message
)
log
.
debug
(
u"Password for user
%
s reset"
,
message
)
flash
(
_
(
u"Password for user
%(user)
s reset"
,
user
=
message
),
category
=
"success"
)
elif
ret
==
0
:
log
.
error
(
u"An unknown error occurred. Please try again later."
)
...
...
cps/templates/email_edit.html
View file @
273572f4
...
...
@@ -47,6 +47,7 @@
<a
href=
"{{ url_for('admin.admin') }}"
id=
"back"
class=
"btn btn-default"
>
{{_('Cancel')}}
</a>
</form>
{% if g.allow_registration %}
<div
class=
"col-md-10 col-lg-6"
>
<h2>
{{_('Allowed Domains (Whitelist)')}}
</h2>
<form
id=
"domain_add_allow"
action=
"{{ url_for('admin.add_domain',allow=1)}}"
method=
"POST"
>
<div
class=
"form-group required"
>
...
...
@@ -81,6 +82,7 @@
</div>
<button
id=
"domain_deny_submit"
class=
"btn btn-default"
>
{{_('Add')}}
</button>
</form>
</div>
{% endif %}
</div>
...
...
cps/ub.py
View file @
273572f4
...
...
@@ -501,6 +501,10 @@ def migrate_Database(session):
conn
.
execute
(
"ALTER TABLE book_read_link ADD column 'last_time_started_reading' DATETIME"
)
conn
.
execute
(
"ALTER TABLE book_read_link ADD column 'times_started_reading' INTEGER DEFAULT 0"
)
session
.
commit
()
test
=
session
.
query
(
ReadBook
)
.
filter
(
ReadBook
.
last_modified
==
None
)
.
all
()
for
book
in
test
:
book
.
last_modified
=
datetime
.
datetime
.
utcnow
()
session
.
commit
()
try
:
session
.
query
(
exists
()
.
where
(
Shelf
.
uuid
))
.
scalar
()
except
exc
.
OperationalError
:
...
...
@@ -559,6 +563,7 @@ def migrate_Database(session):
conn
.
execute
(
"ALTER TABLE user ADD column `allowed_tags` String DEFAULT ''"
)
conn
.
execute
(
"ALTER TABLE user ADD column `denied_column_value` DEFAULT ''"
)
conn
.
execute
(
"ALTER TABLE user ADD column `allowed_column_value` DEFAULT ''"
)
session
.
commit
()
try
:
session
.
query
(
exists
()
.
where
(
User
.
series_view
))
.
scalar
()
except
exc
.
OperationalError
:
...
...
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