Skip to content

Commit

Permalink
✨ [maykinmedia/django-setup-configuration#10] disable config steps by…
Browse files Browse the repository at this point in the history
… default
  • Loading branch information
annashamray committed Sep 11, 2024
1 parent 590495f commit 9eaa4a6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ services:
- DISABLE_2FA=${DISABLE_2FA:-yes}
- SUBPATH=${SUBPATH}
# setup_configuration env vars
- SITES_CONFIG_ENABLE=yes
- OBJECTS_DOMAIN=web:8000
- OBJECTS_ORGANIZATION=Objects
- OBJECTS_OBJECTTYPES_CONFIG_ENABLE=false
Expand Down
6 changes: 3 additions & 3 deletions src/objects/conf/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,12 +100,12 @@

# setup_configuration command
# sites config
SITES_CONFIG_ENABLE = config("SITES_CONFIG_ENABLE", default=True, add_to_docs=False)
SITES_CONFIG_ENABLE = config("SITES_CONFIG_ENABLE", default=False, add_to_docs=False)
OBJECTS_DOMAIN = config("OBJECTS_DOMAIN", "", add_to_docs=False)
OBJECTS_ORGANIZATION = config("OBJECTS_ORGANIZATION", "", add_to_docs=False)
# objecttypes config
OBJECTS_OBJECTTYPES_CONFIG_ENABLE = config(
"OBJECTS_OBJECTTYPES_CONFIG_ENABLE", default=True, add_to_docs=False
"OBJECTS_OBJECTTYPES_CONFIG_ENABLE", default=False, add_to_docs=False
)
OBJECTTYPES_API_ROOT = config("OBJECTTYPES_API_ROOT", "", add_to_docs=False)
if OBJECTTYPES_API_ROOT and not OBJECTTYPES_API_ROOT.endswith("/"):
Expand All @@ -117,7 +117,7 @@
)
OBJECTS_OBJECTTYPES_TOKEN = config("OBJECTS_OBJECTTYPES_TOKEN", "", add_to_docs=False)
# Demo User Configuration
DEMO_CONFIG_ENABLE = config("DEMO_CONFIG_ENABLE", default=DEBUG, add_to_docs=False)
DEMO_CONFIG_ENABLE = config("DEMO_CONFIG_ENABLE", default=False, add_to_docs=False)
DEMO_TOKEN = config("DEMO_TOKEN", "", add_to_docs=False)
DEMO_PERSON = config("DEMO_PERSON", "", add_to_docs=False)
DEMO_EMAIL = config("DEMO_EMAIL", "", add_to_docs=False)
2 changes: 2 additions & 0 deletions src/objects/tests/commands/test_setup_configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,10 @@


@override_settings(
SITES_CONFIG_ENABLE=True,
OBJECTS_DOMAIN="objects.example.com",
OBJECTS_ORGANIZATION="ACME",
OBJECTS_OBJECTTYPES_CONFIG_ENABLE=True,
OBJECTTYPES_API_ROOT="https://objecttypes.example.com/api/v2/",
OBJECTTYPES_API_OAS="https://objecttypes.example.com/api/v2/schema/openapi.yaml",
OBJECTS_OBJECTTYPES_TOKEN="some-random-string",
Expand Down

0 comments on commit 9eaa4a6

Please sign in to comment.