update babel

master
Alexander Graf 3 years ago
parent 5238b00f0b
commit 56f65d724d

@ -57,6 +57,11 @@ def create_app_from_config(config):
config = app.config,
)
# Jinja filter
@app.template_filter()
def format_date(value):
return utils.flask_babel.format_date(value) if value else ''
# Import views
from mailu import ui, internal, sso
app.register_blueprint(ui.ui, url_prefix=app.config['WEB_ADMIN'])

@ -46,8 +46,8 @@
<td>{{ domain.users | count }} / {{ '∞' if domain.max_users == -1 else domain.max_users }}</td>
<td>{{ domain.aliases | count }} / {{ '∞' if domain.max_aliases == -1 else domain.max_aliases }}</td>
<td>{{ domain.comment or '' }}</td>
<td>{{ domain.created_at }}</td>
<td>{{ domain.updated_at or '' }}</td>
<td>{{ domain.created_at | format_date }}</td>
<td>{{ domain.updated_at | format_date }}</td>
</tr>
{%- endfor %}
</tbody>

@ -18,10 +18,9 @@ import secrets
import time
from multiprocessing import Value
from mailu import limiter
from flask import current_app as app
import flask
import flask_login
import flask_migrate

@ -1,6 +1,6 @@
alembic==1.7.4
appdirs==1.4.4
Babel==2.6.0
Babel==2.9.1
bcrypt==3.2.0
blinker==1.4
CacheControl==0.12.6
@ -18,7 +18,7 @@ dnspython==2.1.0
dominate==2.3.5
email-validator==1.1.3
Flask==1.0.2
Flask-Babel==1.0.0
Flask-Babel==2.0.0
Flask-Bootstrap==3.3.7.1
Flask-DebugToolbar==0.10.1
Flask-Limiter==1.0.1
@ -53,7 +53,7 @@ pycparser==2.20
Pygments==2.10.0
pyOpenSSL==21.0.0
pyparsing==2.4.7
pytz==2019.1
pytz==2021.3
PyYAML==6.0
redis==3.5.3
requests==2.25.1

Loading…
Cancel
Save