Skip to content
This repository has been archived by the owner on Aug 7, 2024. It is now read-only.

build: Enable atomic transactions #1865

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions example_project/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
# 'sqlite3' or 'oracle'.
"NAME": os.path.join(os.path.abspath(os.path.dirname(__file__)), "db.sqlite3"),
# Or path to database file if using sqlite3.
"ATOMIC_REQUESTS": True,
}
}

Expand Down
19 changes: 15 additions & 4 deletions example_project/test_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@

BASE_DIR = os.path.dirname(os.path.dirname(__file__))

DATABASES = {"default": {"ENGINE": "django.db.backends.sqlite3"}}
DATABASES = {
"default": {"ENGINE": "django.db.backends.sqlite3", "ATOMIC_REQUESTS": True}
}

TEMPLATES = [
{
Expand Down Expand Up @@ -80,11 +82,17 @@
"output_filename": "portal.css",
},
"popup": {
"source_filenames": (os.path.join(BASE_DIR, "static/portal/sass/partials/_popup.scss"),),
"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"),),
"source_filenames": (
os.path.join(BASE_DIR, "static/game/sass/game.scss"),
),
"output_filename": "game.css",
},
},
Expand All @@ -98,7 +106,10 @@
]
STATICFILES_STORAGE = "pipeline.storage.PipelineStorage"

GAME_SERVER_URL_FUNCTION = lambda game_id: ("base %s" % game_id, "path %s" % game_id)
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

Expand Down
Loading