File tree Expand file tree Collapse file tree 2 files changed +36
-0
lines changed
Expand file tree Collapse file tree 2 files changed +36
-0
lines changed Original file line number Diff line number Diff line change 1+ # Settings
2+
3+ Django Subatomic has some custom [ Django settings] [ django-settings ]
4+ to help with the process of adopting it in existing projects.
5+
6+ ## ` SUBATOMIC_AFTER_COMMIT_NEEDS_TRANSACTION `
7+
8+ (default: ` True ` )
9+
10+ When this setting is ` True ` ,
11+ [ ` run_after_commit ` ] [ django_subatomic.db.run_after_commit ] will raise an exception if no transaction is open.
12+
13+ This setting is intended to help projects
14+ transition to this strict behaviour
15+ by getting it working in tests
16+ before enabling it in production.
17+
18+ ## ` SUBATOMIC_RUN_AFTER_COMMIT_CALLBACKS_IN_TESTS `
19+
20+ (default: ` True ` )
21+
22+ When this setting is ` True ` ,
23+ after-commit callbacks will be run in tests
24+ when a [ ` transaction ` ] [ django_subatomic.db.transaction ]
25+ (or [ ` transaction_if_not_already ` ] [ django_subatomic.db.transaction_if_not_already ] )
26+ context is exited.
27+
28+ This setting is intended to help projects
29+ progressively enable after-commit callbacks in tests
30+ by using [ ` override_settings ` ] [ override_settings ]
31+ on a per-test basis.
32+
33+ [ override_settings ] : https://docs.djangoproject.com/en/stable/topics/testing/tools/#django.test.override_settings
34+ [ django-settings ] : https://docs.djangoproject.com/en/stable/topics/settings/
Original file line number Diff line number Diff line change 11site_name : Django-subatomic docs
22repo_name : kraken-tech/django-subatomic
33repo_url : https://github.com/kraken-tech/django-subatomic
4+ watch :
5+ - src
46theme :
57 name : material
68 logo : static/img/logo.png
You can’t perform that action at this time.
0 commit comments