diff --git a/.codecov.yml b/.codecov.yml index 1a2c36b0d..c71949362 100644 --- a/.codecov.yml +++ b/.codecov.yml @@ -19,7 +19,6 @@ ignore: - "aimmo_runner/**/*" - "test_utils/*" - "setup.py" - - "aimmo/csp_config.py" comment: layout: "reach, diff, flags, files" diff --git a/.gitignore b/.gitignore index 728a77c21..1db20c90b 100644 --- a/.gitignore +++ b/.gitignore @@ -71,7 +71,7 @@ db.sqlite3 *.iml # static folder -example_project/example_project/static/ +static/ # Created during minikube testing test-bin/ diff --git a/Pipfile.lock b/Pipfile.lock index f28465e1a..2fe6eb981 100644 --- a/Pipfile.lock +++ b/Pipfile.lock @@ -50,10 +50,10 @@ }, "cfl-common": { "hashes": [ - "sha256:5ca91090bebeb1d896b1436d54663c3f8e837ac008180835dd4f3472340eac78", - "sha256:c8dacceebb906c66035fd9bf34a14081f79118180ae6dfe85cd44f81cb6740da" + "sha256:24d480e6c1bc7bfa79d064298a08f5cc391bc902e50fb8b1d7777d8756646da8", + "sha256:d4f626c551882b36cf7e6947e59f385fca3674101c7e23fb085c13e702b8c6b8" ], - "version": "==6.18.2" + "version": "==6.18.3" }, "chardet": { "hashes": [ @@ -409,32 +409,32 @@ }, "black": { "hashes": [ - "sha256:074458dc2f6e0d3dab7928d4417bb6957bb834434516f21514138437accdbe90", - "sha256:187d96c5e713f441a5829e77120c269b6514418f4513a390b0499b0987f2ff1c", - "sha256:2ea29072e954a4d55a2ff58971b83365eba5d3d357352a07a7a4df0d95f51c78", - "sha256:4af5bc0e1f96be5ae9bd7aaec219c901a94d6caa2484c21983d043371c733fc4", - "sha256:560558527e52ce8afba936fcce93a7411ab40c7d5fe8c2463e279e843c0328ee", - "sha256:568ac3c465b1c8b34b61cd7a4e349e93f91abf0f9371eda1cf87194663ab684e", - "sha256:6797f58943fceb1c461fb572edbe828d811e719c24e03375fd25170ada53825e", - "sha256:6c1734ab264b8f7929cef8ae5f900b85d579e6cbfde09d7387da8f04771b51c6", - "sha256:6c6d39e28aed379aec40da1c65434c77d75e65bb59a1e1c283de545fb4e7c6c9", - "sha256:7ba9be198ecca5031cd78745780d65a3f75a34b2ff9be5837045dce55db83d1c", - "sha256:94783f636bca89f11eb5d50437e8e17fbc6a929a628d82304c80fa9cd945f256", - "sha256:a218d7e5856f91d20f04e931b6f16d15356db1c846ee55f01bac297a705ca24f", - "sha256:a3db5b6409b96d9bd543323b23ef32a1a2b06416d525d27e0f67e74f1446c8f2", - "sha256:ac609cf8ef5e7115ddd07d85d988d074ed00e10fbc3445aee393e70164a2219c", - "sha256:b154e6bbde1e79ea3260c4b40c0b7b3109ffcdf7bc4ebf8859169a6af72cd70b", - "sha256:b270a168d69edb8b7ed32c193ef10fd27844e5c60852039599f9184460ce0807", - "sha256:b9fd45787ba8aa3f5e0a0a98920c1012c884622c6c920dbe98dbd05bc7c70fbf", - "sha256:c85928b9d5f83b23cee7d0efcb310172412fbf7cb9d9ce963bd67fd141781def", - "sha256:c9a3ac16efe9ec7d7381ddebcc022119794872abce99475345c5a61aa18c45ad", - "sha256:cfaf3895a9634e882bf9d2363fed5af8888802d670f58b279b0bece00e9a872d", - "sha256:e439798f819d49ba1c0bd9664427a05aab79bfba777a6db94fd4e56fae0cb849", - "sha256:f586c26118bc6e714ec58c09df0157fe2d9ee195c764f630eb0d8e7ccce72e69", - "sha256:f6fe02afde060bbeef044af7996f335fbe90b039ccf3f5eb8f16df8b20f77666" + "sha256:0a12e4e1353819af41df998b02c6742643cfef58282915f781d0e4dd7a200411", + "sha256:0ad827325a3a634bae88ae7747db1a395d5ee02cf05d9aa7a9bd77dfb10e940c", + "sha256:32a4b17f644fc288c6ee2bafdf5e3b045f4eff84693ac069d87b1a347d861497", + "sha256:3b2c25f8dea5e8444bdc6788a2f543e1fb01494e144480bc17f806178378005e", + "sha256:4a098a69a02596e1f2a58a2a1c8d5a05d5a74461af552b371e82f9fa4ada8342", + "sha256:5107ea36b2b61917956d018bd25129baf9ad1125e39324a9b18248d362156a27", + "sha256:53198e28a1fb865e9fe97f88220da2e44df6da82b18833b588b1883b16bb5d41", + "sha256:5594efbdc35426e35a7defa1ea1a1cb97c7dbd34c0e49af7fb593a36bd45edab", + "sha256:5b879eb439094751185d1cfdca43023bc6786bd3c60372462b6f051efa6281a5", + "sha256:78dd85caaab7c3153054756b9fe8c611efa63d9e7aecfa33e533060cb14b6d16", + "sha256:792f7eb540ba9a17e8656538701d3eb1afcb134e3b45b71f20b25c77a8db7e6e", + "sha256:8ce13ffed7e66dda0da3e0b2eb1bdfc83f5812f66e09aca2b0978593ed636b6c", + "sha256:a05da0430bd5ced89176db098567973be52ce175a55677436a271102d7eaa3fe", + "sha256:a983526af1bea1e4cf6768e649990f28ee4f4137266921c2c3cee8116ae42ec3", + "sha256:bc4d4123830a2d190e9cc42a2e43570f82ace35c3aeb26a512a2102bce5af7ec", + "sha256:c3a73f66b6d5ba7288cd5d6dad9b4c9b43f4e8a4b789a94bf5abfb878c663eb3", + "sha256:ce957f1d6b78a8a231b18e0dd2d94a33d2ba738cd88a7fe64f53f659eea49fdd", + "sha256:cea1b2542d4e2c02c332e83150e41e3ca80dc0fb8de20df3c5e98e242156222c", + "sha256:d2c21d439b2baf7aa80d6dd4e3659259be64c6f49dfd0f32091063db0e006db4", + "sha256:d839150f61d09e7217f52917259831fe2b689f5c8e5e32611736351b89bb2a90", + "sha256:dd82842bb272297503cbec1a2600b6bfb338dae017186f8f215c8958f8acf869", + "sha256:e8166b7bfe5dcb56d325385bd1d1e0f635f24aae14b3ae437102dedc0c186747", + "sha256:e981e20ec152dfb3e77418fb616077937378b322d7b26aa1ff87717fb18b4875" ], "index": "pypi", - "version": "==22.6.0" + "version": "==22.8.0" }, "cachetools": { "hashes": [ @@ -452,10 +452,10 @@ }, "cfl-common": { "hashes": [ - "sha256:5ca91090bebeb1d896b1436d54663c3f8e837ac008180835dd4f3472340eac78", - "sha256:c8dacceebb906c66035fd9bf34a14081f79118180ae6dfe85cd44f81cb6740da" + "sha256:24d480e6c1bc7bfa79d064298a08f5cc391bc902e50fb8b1d7777d8756646da8", + "sha256:d4f626c551882b36cf7e6947e59f385fca3674101c7e23fb085c13e702b8c6b8" ], - "version": "==6.18.2" + "version": "==6.18.3" }, "chardet": { "hashes": [ @@ -473,11 +473,11 @@ }, "codeforlife-portal": { "hashes": [ - "sha256:2ca1b4a729ed6603fac5d218ff9e88a1c26f4b3ded6053e8feddf6a5027bf8e7", - "sha256:e1d4a175b7d91a12a97b2844c178d961472e781fe9774047b15b4153ffe58e56" + "sha256:8628c4f03f72049b52d3f84bbbacf74e5460b87a16e87dad2bc5ea17c8edc748", + "sha256:9dc7c3423a506604fa72c05901dd625ade059065c80ad15a9d57f2d8b5383083" ], "index": "pypi", - "version": "==6.18.2" + "version": "==6.18.3" }, "coverage": { "hashes": [ @@ -820,10 +820,10 @@ }, "pathspec": { "hashes": [ - "sha256:01eecd304ba0e6eeed188ae5fa568e99ef10265af7fd9ab737d6412b4ee0ab85", - "sha256:aefa80ac32d5bf1f96139dca67cefb69a431beff4e6bf1168468f37d7ab87015" + "sha256:46846318467efc4556ccfd27816e004270a9eeeeb4d062ce5e6fc7a87c573f93", + "sha256:7ace6161b621d31e7902eb6b5ae148d12cfd23f4a249b9ffb6b9fee12084323d" ], - "version": "==0.10.0" + "version": "==0.10.1" }, "phonenumbers": { "hashes": [ @@ -849,10 +849,10 @@ "sha256:2ad0d4df0f5ef2247e27fc790d5c9b5a0af8ade9ba340db4a73bb1a4a3e5fb4f", "sha256:2c58b24e3a63efd22554c676d81b0e57f80e0a7d3a5874a7e14ce90ec40d3069", "sha256:2d33a11f601213dcd5718109c09a52c2a1c893e7461f0be2d6febc2879ec2402", + "sha256:336b9036127eab855beec9662ac3ea13a4544a523ae273cbf108b228ecac8437", "sha256:337a74fd2f291c607d220c793a8135273c4c2ab001b03e601c36766005f36885", "sha256:37ff6b522a26d0538b753f0b4e8e164fdada12db6c6f00f62145d732d8a3152e", "sha256:3d1f14f5f691f55e1b47f824ca4fdcb4b19b4323fe43cc7bb105988cad7496be", - "sha256:408673ed75594933714482501fe97e055a42996087eeca7e5d06e33218d05aa8", "sha256:4134d3f1ba5f15027ff5c04296f13328fecd46921424084516bdb1b2548e66ff", "sha256:4ad2f835e0ad81d1689f1b7e3fbac7b01bb8777d5a985c8962bedee0cc6d43da", "sha256:50dff9cc21826d2977ef2d2a205504034e3a4563ca6f5db739b0d1026658e004", @@ -861,7 +861,6 @@ "sha256:69bd1a15d7ba3694631e00df8de65a8cb031911ca11f44929c97fe05eb9b6c1d", "sha256:6bf088c1ce160f50ea40764f825ec9b72ed9da25346216b91361eef8ad1b8f8c", "sha256:6e8c66f70fb539301e064f6478d7453e820d8a2c631da948a23384865cd95544", - "sha256:727dd1389bc5cb9827cbd1f9d40d2c2a1a0c9b32dd2261db522d22a604a6eec9", "sha256:74a04183e6e64930b667d321524e3c5361094bb4af9083db5c301db64cd341f3", "sha256:75e636fd3e0fb872693f23ccb8a5ff2cd578801251f3a4f6854c6a5d437d3c04", "sha256:7761afe0126d046974a01e030ae7529ed0ca6a196de3ec6937c11df0df1bc91c", @@ -877,6 +876,7 @@ "sha256:a647c0d4478b995c5e54615a2e5360ccedd2f85e70ab57fbe817ca613d5e63b8", "sha256:a9c9bc489f8ab30906d7a85afac4b4944a572a7432e00698a7239f44a44e6efb", "sha256:ad2277b185ebce47a63f4dc6302e30f05762b688f8dc3de55dbae4651872cdf3", + "sha256:adabc0bce035467fb537ef3e5e74f2847c8af217ee0be0455d4fec8adc0462fc", "sha256:b6d5e92df2b77665e07ddb2e4dbd6d644b78e4c0d2e9272a852627cdba0d75cf", "sha256:bc431b065722a5ad1dfb4df354fb9333b7a582a5ee39a90e6ffff688d72f27a1", "sha256:bdd0de2d64688ecae88dd8935012c4a72681e5df632af903a1dca8c5e7aa871a", diff --git a/aimmo/csp_config.py b/aimmo/csp_config.py deleted file mode 100644 index 9d21f1316..000000000 --- a/aimmo/csp_config.py +++ /dev/null @@ -1,16 +0,0 @@ -"""CSP config""" - -from common.app_settings import domain, MODULE_NAME - -CSP_DEFAULT_SRC = ("'self'",) -CSP_IMG_SRC = (f"{domain()}/static/", "https://p.typekit.net/") -CSP_FONT_SRC = (("https://use.typekit.net/",),) -CSP_SCRIPT_SRC = ("https://use.typekit.net/mrl4ieu.js", "https://pyodide-cdn2.iodide.io/v0.15.0/full/") -CSP_CONNECT_SRC = ( - "https://pyodide-cdn2.iodide.io/v0.15.0/full/", - f"wss://{MODULE_NAME}-aimmo.codeforlife.education/", - f"https://{MODULE_NAME}-aimmo.codeforlife.education/", -) - -if MODULE_NAME == "local": - CSP_CONNECT_SRC += ("ws://localhost:*/", "ws://*:*/socket.io/", "http://*:*/socket.io/") diff --git a/aimmo_runner/runner.py b/aimmo_runner/runner.py index 165264e4f..8fc143649 100644 --- a/aimmo_runner/runner.py +++ b/aimmo_runner/runner.py @@ -2,10 +2,9 @@ import logging import os -import sys -import time import django +import sys from django.conf import settings from .shell_api import log, run_command, run_command_async @@ -13,9 +12,7 @@ ROOT_DIR_LOCATION = os.path.abspath(os.path.dirname((os.path.dirname(__file__)))) _MANAGE_PY = os.path.join(ROOT_DIR_LOCATION, "example_project", "manage.py") -_FRONTEND_BUNDLER_JS = os.path.join( - ROOT_DIR_LOCATION, "game_frontend", "djangoBundler.js" -) +_FRONTEND_BUNDLER_JS = os.path.join(ROOT_DIR_LOCATION, "game_frontend", "djangoBundler.js") PROCESSES = [] @@ -27,25 +24,18 @@ def create_superuser_if_missing(username, password): User.objects.get_by_natural_key(username) except User.DoesNotExist: log("Creating superuser %s with password %s" % (username, password)) - User.objects.create_superuser( - username=username, email="admin@admin.com", password=password - ) + User.objects.create_superuser(username=username, email="admin@admin.com", password=password) def build_worker_package(): - run_command( - [os.path.join(ROOT_DIR_LOCATION, "aimmo_runner", "build_worker_wheel.sh")], - capture_output=True, - ) + run_command([os.path.join(ROOT_DIR_LOCATION, "aimmo_runner", "build_worker_wheel.sh")], capture_output=True) def build_frontend(using_cypress, capture_output): if using_cypress: run_command(["node", _FRONTEND_BUNDLER_JS], capture_output=capture_output) else: - frontend_bundler = run_command_async( - ["node", _FRONTEND_BUNDLER_JS], capture_output=capture_output - ) + frontend_bundler = run_command_async(["node", _FRONTEND_BUNDLER_JS], capture_output=capture_output) PROCESSES.append(frontend_bundler) @@ -63,13 +53,7 @@ def start_game_servers(build_target, server_args): os.environ["AIMMO_MODE"] = "minikube" -def run( - server_wait=True, - using_cypress=False, - capture_output=False, - test_env=False, - build_target=None, -): +def run(server_wait=True, using_cypress=False, capture_output=False, test_env=False, build_target=None): logging.basicConfig() build_worker_package() @@ -90,31 +74,18 @@ def run( build_frontend(using_cypress, capture_output) - run_command( - ["pip", "install", "-e", ROOT_DIR_LOCATION], capture_output=capture_output - ) + run_command(["pip", "install", "-e", ROOT_DIR_LOCATION], capture_output=capture_output) if not test_env: - run_command( - ["python", _MANAGE_PY, "migrate", "--noinput"], - capture_output=capture_output, - ) - run_command( - ["python", _MANAGE_PY, "collectstatic", "--noinput"], - capture_output=capture_output, - ) - - create_superuser_if_missing(username="admin", password="admin") + run_command(["python", _MANAGE_PY, "migrate", "--noinput"], capture_output=capture_output) + run_command(["python", _MANAGE_PY, "collectstatic", "--noinput", "--clear"], capture_output=capture_output) server_args = [] if not using_cypress: start_game_servers(build_target, server_args) os.environ["SERVER_ENV"] = "local" - server = run_command_async( - ["python", _MANAGE_PY, "runserver"] + server_args, - capture_output=capture_output, - ) + server = run_command_async(["python", _MANAGE_PY, "runserver"] + server_args, capture_output=capture_output) PROCESSES.append(server) if server_wait: diff --git a/example_project/example_project/__init__.py b/example_project/__init__.py similarity index 100% rename from example_project/example_project/__init__.py rename to example_project/__init__.py diff --git a/example_project/manage.py b/example_project/manage.py index 562fa229c..c71daa859 100755 --- a/example_project/manage.py +++ b/example_project/manage.py @@ -5,7 +5,7 @@ from kubernetes.config import load_kube_config if __name__ == "__main__": - os.environ.setdefault("DJANGO_SETTINGS_MODULE", "example_project.settings") + os.environ.setdefault("DJANGO_SETTINGS_MODULE", "settings") from django.core.management import execute_from_command_line diff --git a/example_project/example_project/settings.py b/example_project/settings.py similarity index 74% rename from example_project/example_project/settings.py rename to example_project/settings.py index a8a3845d7..dd8948409 100644 --- a/example_project/example_project/settings.py +++ b/example_project/settings.py @@ -1,12 +1,12 @@ """Django settings for example_project project.""" -import os import mimetypes +import os from django.http import Http404 from kubernetes.client.api.custom_objects_api import CustomObjectsApi from kubernetes.client.api_client import ApiClient -from aimmo.csp_config import * # Still keeping the config file, seems cleaner? +BASE_DIR = os.path.dirname(os.path.dirname(__file__)) ALLOWED_HOSTS = ["*"] @@ -29,36 +29,37 @@ TIME_ZONE = "Europe/London" LANGUAGE_CODE = "en-gb" -STATIC_ROOT = os.path.join(os.path.dirname(__file__), "static") +STATIC_ROOT = os.path.join(BASE_DIR, "static") STATIC_URL = "/static/" -SECRET_KEY = "not-a-secret" +STATICFILES_DIRS = [os.path.join(BASE_DIR, "aimmo/static")] mimetypes.add_type("application/wasm", ".wasm", True) -ROOT_URLCONF = "example_project.urls" +SECRET_KEY = "not-a-secret" +ROOT_URLCONF = "urls" WSGI_APPLICATION = "example_project.wsgi.application" DEFAULT_AUTO_FIELD = "django.db.models.AutoField" INSTALLED_APPS = [ + "game", + "pipeline", + "portal", + "aimmo", + "common", "django.contrib.admin", "django.contrib.admindocs", "django.contrib.auth", "django.contrib.contenttypes", "django.contrib.sessions", "django.contrib.messages", - "django.contrib.sites", "django.contrib.staticfiles", - "aimmo", - "game", - "portal", - "common", "django_js_reverse", - "rest_framework", "django_otp", "django_otp.plugins.otp_static", "django_otp.plugins.otp_totp", + "rest_framework", "sekizai", # for javascript and css management ] @@ -99,6 +100,37 @@ "django.contrib.messages.middleware.MessageMiddleware", ] +PIPELINE = { + "SASS_ARGUMENTS": "--quiet", + "COMPILERS": ("game.pipeline_compilers.LibSassCompiler",), + "STYLESHEETS": { + "css": { + "source_filenames": ( + os.path.join(BASE_DIR, "static/portal/sass/bootstrap.scss"), + os.path.join(BASE_DIR, "static/portal/sass/colorbox.scss"), + os.path.join(BASE_DIR, "static/portal/sass/styles.scss"), + ), + "output_filename": "portal.css", + }, + "popup": { + "source_filenames": (os.path.join(BASE_DIR, "static/portal/sass/partials/_popup.scss"),), + "output_filename": "popup.css", + }, + "game-scss": { + "source_filenames": (os.path.join(BASE_DIR, "static/game/sass/game.scss"),), + "output_filename": "game.css", + }, + }, + "CSS_COMPRESSOR": None, +} + +STATICFILES_FINDERS = [ + "pipeline.finders.PipelineFinder", + "django.contrib.staticfiles.finders.FileSystemFinder", + "django.contrib.staticfiles.finders.AppDirectoriesFinder", +] +STATICFILES_STORAGE = "pipeline.storage.PipelineStorage" + # This is used in common to enable/disable the OneTrust cookie management script COOKIE_MANAGEMENT_ENABLED = False @@ -138,3 +170,5 @@ def get_game_url_base_and_path(game_id: int) -> str: from example_project.local_settings import * # pylint: disable=E0611 except ImportError: pass + +from common.csp_config import * diff --git a/test_settings.py b/example_project/test_settings.py similarity index 56% rename from test_settings.py rename to example_project/test_settings.py index e965d3e2b..3e4b1c76a 100644 --- a/test_settings.py +++ b/example_project/test_settings.py @@ -1,3 +1,7 @@ +import os + +BASE_DIR = os.path.dirname(os.path.dirname(__file__)) + DATABASES = {"default": {"ENGINE": "django.db.backends.sqlite3"}} TEMPLATES = [ @@ -17,33 +21,34 @@ ] INSTALLED_APPS = [ + "game", + "pipeline", + "portal", + "aimmo", + "common", "django.contrib.admin", "django.contrib.admindocs", "django.contrib.auth", "django.contrib.contenttypes", "django.contrib.sessions", "django.contrib.messages", - "django.contrib.sites", "django.contrib.staticfiles", - "aimmo", - "game", - "portal", - "common", "django_js_reverse", - "rest_framework", "django_otp", "django_otp.plugins.otp_static", "django_otp.plugins.otp_totp", + "rest_framework", "sekizai", # for javascript and css management ] PIPELINE_ENABLED = False -ROOT_URLCONF = "example_project.example_project.urls" -STATIC_ROOT = "example_project/example_project/static" +ROOT_URLCONF = "example_project.urls" +STATIC_ROOT = os.path.join(BASE_DIR, "static") STATIC_URL = "/static/" +STATICFILES_DIRS = [os.path.join(BASE_DIR, "aimmo/static")] SECRET_KEY = "bad_test_secret" -WSGI_APPLICATION = "example_project.wsgi.application" +WSGI_APPLICATION = "wsgi.application" MIDDLEWARE = [ "django.contrib.sessions.middleware.SessionMiddleware", @@ -54,6 +59,37 @@ "django.contrib.messages.middleware.MessageMiddleware", ] +PIPELINE = { + "SASS_ARGUMENTS": "--quiet", + "COMPILERS": ("game.pipeline_compilers.LibSassCompiler",), + "STYLESHEETS": { + "css": { + "source_filenames": ( + os.path.join(BASE_DIR, "static/portal/sass/bootstrap.scss"), + os.path.join(BASE_DIR, "static/portal/sass/colorbox.scss"), + os.path.join(BASE_DIR, "static/portal/sass/styles.scss"), + ), + "output_filename": "portal.css", + }, + "popup": { + "source_filenames": (os.path.join(BASE_DIR, "static/portal/sass/partials/_popup.scss"),), + "output_filename": "popup.css", + }, + "game-scss": { + "source_filenames": (os.path.join(BASE_DIR, "static/game/sass/game.scss"),), + "output_filename": "game.css", + }, + }, + "CSS_COMPRESSOR": None, +} + +STATICFILES_FINDERS = [ + "pipeline.finders.PipelineFinder", + "django.contrib.staticfiles.finders.FileSystemFinder", + "django.contrib.staticfiles.finders.AppDirectoriesFinder", +] +STATICFILES_STORAGE = "pipeline.storage.PipelineStorage" + GAME_SERVER_URL_FUNCTION = lambda game_id: ("base %s" % game_id, "path %s" % game_id) GAME_SERVER_PORT_FUNCTION = lambda game_id: 8001 GAME_SERVER_SSL_FLAG = False diff --git a/example_project/example_project/urls.py b/example_project/urls.py similarity index 100% rename from example_project/example_project/urls.py rename to example_project/urls.py diff --git a/example_project/example_project/wsgi.py b/example_project/wsgi.py similarity index 91% rename from example_project/example_project/wsgi.py rename to example_project/wsgi.py index bb990d483..504203665 100644 --- a/example_project/example_project/wsgi.py +++ b/example_project/wsgi.py @@ -15,7 +15,7 @@ """ import os -os.environ.setdefault("DJANGO_SETTINGS_MODULE", "example_project.settings") +os.environ.setdefault("DJANGO_SETTINGS_MODULE", "settings") from django.core.wsgi import get_wsgi_application diff --git a/pytest.ini b/pytest.ini index 51bf53fa4..d90f2c748 100644 --- a/pytest.ini +++ b/pytest.ini @@ -1,5 +1,5 @@ [pytest] -DJANGO_SETTINGS_MODULE = test_settings +DJANGO_SETTINGS_MODULE = example_project.test_settings addopts = -p no:warnings django_find_project = false python_paths = example_project/manage.py test_settings.py