Coverage for /var/srv/projects/api.amasfac.comuna18.com/tmp/venv/lib/python3.9/site-packages/django/__init__.py: 93%
12 statements
« prev ^ index » next coverage.py v6.4.4, created at 2023-07-17 14:22 -0600
« prev ^ index » next coverage.py v6.4.4, created at 2023-07-17 14:22 -0600
1from django.utils.version import get_version
3VERSION = (4, 0, 6, "final", 0)
5__version__ = get_version(VERSION)
8def setup(set_prefix=True):
9 """
10 Configure the settings (this happens as a side effect of accessing the
11 first setting), configure logging and populate the app registry.
12 Set the thread-local urlresolvers script prefix if `set_prefix` is True.
13 """
14 from django.apps import apps
15 from django.conf import settings
16 from django.urls import set_script_prefix
17 from django.utils.log import configure_logging
19 configure_logging(settings.LOGGING_CONFIG, settings.LOGGING)
20 if set_prefix: 20 ↛ 24line 20 didn't jump to line 24, because the condition on line 20 was never false
21 set_script_prefix(
22 "/" if settings.FORCE_SCRIPT_NAME is None else settings.FORCE_SCRIPT_NAME
23 )
24 apps.populate(settings.INSTALLED_APPS)