26 lines
806 B
Python
26 lines
806 B
Python
import os
|
|
import sys
|
|
|
|
|
|
def _patch_legacy_django_translation_aliases():
|
|
from django.utils import translation
|
|
|
|
if not hasattr(translation, "ugettext_lazy"):
|
|
translation.ugettext_lazy = translation.gettext_lazy
|
|
if not hasattr(translation, "ugettext"):
|
|
translation.ugettext = translation.gettext
|
|
if not hasattr(translation, "ungettext"):
|
|
translation.ungettext = translation.ngettext
|
|
if not hasattr(translation, "ungettext_lazy"):
|
|
translation.ungettext_lazy = translation.ngettext_lazy
|
|
|
|
|
|
def main():
|
|
os.environ.setdefault(
|
|
"DJANGO_SETTINGS_MODULE", "customer_zero_test_r35.settings.base"
|
|
)
|
|
_patch_legacy_django_translation_aliases()
|
|
from django.core.management import execute_from_command_line
|
|
|
|
execute_from_command_line(sys.argv)
|