Files
tryton/bin/trytond-admin
T
Cédric Krier dfd71fae7c Import admin and console after application is configured
otherwise the backend loaded in always SQLite.

issue8749
2019-11-27 17:48:32 +01:00

24 lines
658 B
Python
Executable File

#!/usr/bin/env python3
# This file is part of Tryton. The COPYRIGHT file at the top level of
# this repository contains the full copyright notices and license terms.
import sys
import os
DIR = os.path.abspath(os.path.normpath(os.path.join(__file__,
'..', '..', 'trytond')))
if os.path.isdir(DIR):
sys.path.insert(0, os.path.dirname(DIR))
import trytond.commandline as commandline
from trytond.config import config
parser = commandline.get_parser_admin()
options = parser.parse_args()
config.update_etc(options.configfile)
commandline.config_log(options)
# Import after application is configured
import trytond.admin as admin
admin.run(options)