diff --git a/custom/custom/alembic/env.py b/custom/custom/alembic/env.py index 75f18d185..72c8c7993 100644 --- a/custom/custom/alembic/env.py +++ b/custom/custom/alembic/env.py @@ -1,10 +1,11 @@ """Pyramid bootstrap environment. """ from alembic import context -from custom.models.meta import Base from pyramid.paster import get_appsettings, setup_logging from sqlalchemy import engine_from_config +from custom.models.meta import Base + config = context.config setup_logging(config.config_file_name) diff --git a/custom/custom/scripts/initialize_db.py b/custom/custom/scripts/initialize_db.py index ad0644727..f7a818abf 100644 --- a/custom/custom/scripts/initialize_db.py +++ b/custom/custom/scripts/initialize_db.py @@ -1,10 +1,11 @@ import argparse import sys -from custom.models.meta import Base from pyramid.paster import bootstrap, setup_logging from sqlalchemy.exc import OperationalError +from custom.models.meta import Base + def setup_models(dbsession): """ diff --git a/custom/custom/views/feedback.py b/custom/custom/views/feedback.py index 5bd31c17b..0da4e22d0 100644 --- a/custom/custom/views/feedback.py +++ b/custom/custom/views/feedback.py @@ -5,9 +5,10 @@ import pyramid.request import requests from cornice import Service +from pyramid.httpexceptions import HTTPBadRequest + from custom.models.feedback import Feedback from custom.util.send_mail import send_mail -from pyramid.httpexceptions import HTTPBadRequest LOG = logging.getLogger(__name__) diff --git a/custom/tests/conftest.py b/custom/tests/conftest.py index 4145a9043..b241dffe0 100644 --- a/custom/tests/conftest.py +++ b/custom/tests/conftest.py @@ -6,12 +6,13 @@ import pytest import transaction import webtest -from custom import main, models -from custom.models.meta import Base from pyramid.paster import get_appsettings from pyramid.scripting import prepare from pyramid.testing import DummyRequest, testConfig +from custom import main, models +from custom.models.meta import Base + def pytest_addoption(parser): parser.addoption("--ini", action="store", metavar="INI_FILE")