def run(command):
if not settings.configured:
settings.configure(**DEFAULT_SETTINGS)
# Compatibility with Django 1.7's stricter initialization
if hasattr(django, 'setup'):
django.setup()
parent = os.path.dirname(os.path.abspath(__file__))
appdir = os.path.join(parent, 'lbattachment')
os.chdir(appdir)
from django.core.management import call_command
params = {}
if command == 'make':
params['locale'] = ['zh-Hans']
call_command('%smessages' % command, **params)
评论列表
文章目录