Skip to content

Commit 7ad3981

Browse files
authored
fix: add plugin_settings function in test settings (openedx#107)
1 parent fbc9821 commit 7ad3981

1 file changed

Lines changed: 20 additions & 6 deletions

File tree

openedx_authz/settings/test.py

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,18 @@
66

77
from openedx_authz import ROOT_DIRECTORY
88

9-
# Add Casbin configuration
10-
CASBIN_MODEL = os.path.join(ROOT_DIRECTORY, "engine", "config", "model.conf")
11-
# Redis host and port are temporarily loaded here for the MVP
12-
REDIS_HOST = "redis"
13-
REDIS_PORT = 6379
9+
10+
def plugin_settings(settings): # pylint: disable=unused-argument
11+
"""
12+
Configure plugin settings for Open edX.
13+
This function is called by the Open edX plugin system to configure
14+
the Django settings for this plugin.
15+
16+
Args:
17+
settings: The Django settings object
18+
"""
19+
20+
1421
DATABASES = {
1522
"default": {
1623
"ENGINE": "django.db.backends.sqlite3",
@@ -55,6 +62,13 @@
5562
]
5663

5764
SECRET_KEY = "test-secret-key"
58-
CASBIN_WATCHER_ENABLED = False
65+
5966
USE_TZ = True
67+
6068
ROOT_URLCONF = "openedx_authz.urls"
69+
70+
# Casbin configuration
71+
CASBIN_MODEL = os.path.join(ROOT_DIRECTORY, "engine", "config", "model.conf")
72+
CASBIN_WATCHER_ENABLED = False
73+
REDIS_HOST = "redis"
74+
REDIS_PORT = 6379

0 commit comments

Comments
 (0)