Skip to content

Commit

Permalink
Call load_dotenv before imports (#456)
Browse files Browse the repository at this point in the history
  • Loading branch information
jace authored Aug 10, 2023
1 parent d9307f1 commit 32b08e5
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions console.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,20 @@
import logging

from flask import jsonify, make_response
from flask.cli import load_dotenv

from isoweek import Week
import IPython

from boxoffice import app
from boxoffice.extapi import razorpay
from boxoffice.mailclient import send_participant_assignment_mail, send_receipt_mail
from boxoffice.models import (
load_dotenv()

from boxoffice import app # noqa: E402
from boxoffice.extapi import razorpay # noqa: E402
from boxoffice.mailclient import ( # noqa: E402
send_participant_assignment_mail,
send_receipt_mail,
)
from boxoffice.models import ( # noqa: E402
CURRENCY,
INVOICE_STATUS,
LINE_ITEM_STATUS,
Expand All @@ -25,9 +31,9 @@
PaymentTransaction,
db,
)
from boxoffice.views.custom_exceptions import PaymentGatewayError
from boxoffice.views.order import process_partial_refund_for_order
from coaster.utils import isoweek_datetime, midnight_to_utc, utcnow
from boxoffice.views.custom_exceptions import PaymentGatewayError # noqa: E402
from boxoffice.views.order import process_partial_refund_for_order # noqa: E402
from coaster.utils import isoweek_datetime, midnight_to_utc, utcnow # noqa: E402

logging.basicConfig()
logging.getLogger('sqlalchemy.engine').setLevel(logging.INFO)
Expand Down

0 comments on commit 32b08e5

Please sign in to comment.