File tree Expand file tree Collapse file tree 3 files changed +46
-2
lines changed
Expand file tree Collapse file tree 3 files changed +46
-2
lines changed Original file line number Diff line number Diff line change 303303# be used instead of TCP.
304304MEETINGS_STATUS_BASE_URL = None
305305
306- # If there is a local_settings.py, let it override our settings
306+ # First, attempt to load settings from a pgeu_system_settings module
307+ # available somewhere in the PYTHONPATH.
307308try :
308- from . local_settings import *
309+ from pgeu_system_global_settings import *
309310except ImportError as e :
310311 pass
312+ # Next, give the local_settings.py from the postgresqleu tree a chance
313+ # to provide configuration.
314+ try :
315+ from .local_settings import *
316+ except ImportError as e :
317+ # If there's no local_settings.py within the postgresqleu tree, check
318+ # for a globally available pgeu_system_settings module in any configured
319+ # PYTHONPATH.
320+ try :
321+ from pgeu_system_settings import *
322+ except ImportError as e :
323+ pass
311324
312325PRELOAD_URLS = []
313326if 'SYSTEM_SKIN_DIRECTORY' in globals ():
334347else :
335348 HAS_SKIN = False
336349
350+ # Try to load overrides from PYTHONPATH. This allows overriding skin
351+ # settings for testing purposes.
352+ try :
353+ from pgeu_system_override_settings import *
354+ except ImportError as e :
355+ pass
337356
338357if not SECRET_KEY :
339358 raise Exception ("SECRET_KEY must be configured!" )
Original file line number Diff line number Diff line change 1+ Configuration
2+ -------------
3+
4+ The traditional approach is to create a local_settings.py file under
5+ the postgresqleu directory, a template is provided.
6+
7+ To allow out-of-module configuration, it is possible to instead
8+ provide a python module pgeu_system_global_settings and extend
9+ PYTHONPATH for it to be detected. Settings in there are loaded first,
10+ in case the above mentioned local_settings.py is available, too, it
11+ will override global settings.
12+
13+ The skin usually provides skin_settings.py and allows customization
14+ through a similar skin_local_settings.py. These again take precedence
15+ over global settings.
16+
17+ Last, a global python module pgeu_system_override_settings is
18+ attempted to be loaded. It allows overriding any settings of the
19+ pgeu-system or the skin.
20+
21+
122Dependencies needed before running
223----------------------------------
324
Original file line number Diff line number Diff line change 3333chmod +x ../../python
3434../../python -m pip install -r dev_requirements.txt
3535
36+ # Configure the test instance. This is done through the traditional
37+ # approach with local_settings.py here. An alternative would be to
38+ # write the very same content to
39+ # venv_dev/lib/python3.11/site-packages/pgeu_system_global_settings.py
3640cd ../..
3741cat > postgresqleu/local_settings.py << EOF
3842DEBUG=True
You can’t perform that action at this time.
0 commit comments