mirror of
https://github.com/janeczku/calibre-web
synced 2024-11-10 01:13:33 +00:00
Merge branch 'master' into Develop
# Conflicts: # cps/ub.py
This commit is contained in:
commit
273572f44c
@ -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.")
|
||||
|
@ -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>
|
||||
|
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user