From 3e51aa3930ac4a1e9107fcb97c4b6c40eaf94301 Mon Sep 17 00:00:00 2001 From: Brandon Liu Date: Wed, 23 Sep 2015 13:15:08 +0800 Subject: [PATCH] add language code command line option to management command. --- statictemplate/management/commands/statictemplate.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/statictemplate/management/commands/statictemplate.py b/statictemplate/management/commands/statictemplate.py index 9c3ef53..3b6761b 100644 --- a/statictemplate/management/commands/statictemplate.py +++ b/statictemplate/management/commands/statictemplate.py @@ -82,10 +82,15 @@ class Command(BaseCommand): action='store', dest='output', help='Output file'), + make_option('--language-code', '-l', + action='store', + dest='language_code', + help='Language Code') ) def handle(self, template, language=None, extra_request=None, **options): request = {} + language = options.get('language_code', False) if not language: language = get_language() if extra_request: