Skip to content

Commit

Permalink
core: replaced flask babelex for invenio_i18n
Browse files Browse the repository at this point in the history
  • Loading branch information
alejandromumo authored and zzacharo committed Jul 3, 2023
1 parent 0aef128 commit 948a7ca
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 0 additions & 2 deletions examples/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,11 @@
"""

from flask import Flask
from flask_babelex import Babel

from invenio_webhooks import InvenioWebhooks

# Create Flask application
app = Flask(__name__)
Babel(app)
InvenioWebhooks(app)

if __name__ == "__main__":
Expand Down
2 changes: 1 addition & 1 deletion invenio_webhooks/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@

from flask import Blueprint, abort, current_app, jsonify, request, url_for
from flask.views import MethodView
from flask_babelex import lazy_gettext as _
from flask_login import current_user
from invenio_db import db
from invenio_i18n import _
from invenio_oauth2server import require_api_auth, require_oauth_scopes
from invenio_oauth2server.models import Scope

Expand Down
2 changes: 2 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ tests =
# iniconfig>=1.1.1

[options.entry_points]
invenio_base.apps =
invenio_webhooks = invenio_webhooks:InvenioWebhooks
invenio_base.api_apps =
invenio_webhooks = invenio_webhooks:InvenioWebhooks
invenio_base.api_blueprints =
Expand Down
4 changes: 2 additions & 2 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@

import pytest
from flask import Flask
from flask_babelex import Babel
from flask_breadcrumbs import Breadcrumbs
from flask_mail import Mail
from flask_menu import Menu
Expand All @@ -38,6 +37,7 @@
from invenio_accounts.views import blueprint as accounts_blueprint
from invenio_celery import InvenioCelery
from invenio_db import InvenioDB, db
from invenio_i18n import InvenioI18N
from invenio_oauth2server import InvenioOAuth2Server, InvenioOAuth2ServerREST
from invenio_oauth2server.models import Token
from invenio_oauth2server.views import server_blueprint, settings_blueprint
Expand Down Expand Up @@ -77,7 +77,7 @@ def app(request):
TESTING=True,
WTF_CSRF_ENABLED=False,
)
Babel(app)
InvenioI18N(app)
Mail(app)
Menu(app)
Breadcrumbs(app)
Expand Down

0 comments on commit 948a7ca

Please sign in to comment.