Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 26 additions & 4 deletions manage.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,39 @@
#!/usr/bin/env python
"""
Entry point for running Django management commands.

This script sets the default Django settings module and
executes command line instructions using Django's
management utility.
"""

# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
# Copyright (c) 2021-present Kaleidos INC

# Copyright (c) 2021-present Kaleidos INC

import os
import sys

if __name__ == "__main__":

def main():
"""
Configure Django settings and run management commands.
"""
# Set default settings module for the Django project
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "settings.common")

from django.core.management import execute_from_command_line
try:
from django.core.management import execute_from_command_line
except ImportError as exc:
raise ImportError(
"Django is not installed or not available in the environment."
) from exc

# Execute command-line arguments
execute_from_command_line(sys.argv)


if __name__ == "__main__":
main()