Merge pull request #36302 from ormsbee/remove-custom-startup
fix: remove custom startup to fix dev reloading
This commit is contained in:
@@ -6,10 +6,7 @@ pytest from looking for the conftest.py module in the parent directory when
|
||||
only running cms tests.
|
||||
"""
|
||||
|
||||
|
||||
import importlib
|
||||
import logging
|
||||
import os
|
||||
|
||||
import pytest
|
||||
|
||||
@@ -29,13 +26,6 @@ def pytest_configure(config):
|
||||
else:
|
||||
logging.info("pytest did not register json_report correctly")
|
||||
|
||||
if config.getoption('help'):
|
||||
return
|
||||
settings_module = os.environ.get('DJANGO_SETTINGS_MODULE')
|
||||
startup_module = 'cms.startup' if settings_module.startswith('cms') else 'lms.startup'
|
||||
startup = importlib.import_module(startup_module)
|
||||
startup.run()
|
||||
|
||||
|
||||
@pytest.fixture(autouse=True, scope='function')
|
||||
def _django_clear_site_cache():
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
"""
|
||||
Module for code that should run during Studio startup (deprecated)
|
||||
"""
|
||||
|
||||
|
||||
import django
|
||||
from django.conf import settings
|
||||
|
||||
# Force settings to run so that the python path is modified
|
||||
settings.INSTALLED_APPS # pylint: disable=pointless-statement
|
||||
|
||||
|
||||
def run():
|
||||
"""
|
||||
Executed during django startup
|
||||
|
||||
NOTE: DO **NOT** add additional code to this method or this file! The Platform Team
|
||||
is moving all startup code to more standard locations using Django best practices.
|
||||
"""
|
||||
django.setup()
|
||||
@@ -18,9 +18,6 @@ defuse_xml_libs()
|
||||
import os # lint-amnesty, pylint: disable=wrong-import-order, wrong-import-position
|
||||
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "cms.envs.aws")
|
||||
|
||||
import cms.startup as startup # lint-amnesty, pylint: disable=wrong-import-position
|
||||
startup.run()
|
||||
|
||||
# This application object is used by the development server
|
||||
# as well as any WSGI server configured to use this file.
|
||||
from django.core.wsgi import get_wsgi_application # lint-amnesty, pylint: disable=wrong-import-order, wrong-import-position
|
||||
|
||||
Reference in New Issue
Block a user