diff --git a/django/core/management/templates.py b/django/core/management/templates.py
index 1de508d..f31d33e 100644
a
|
b
|
class TemplateCommand(BaseCommand):
|
53 | 53 | action='append', default=[], |
54 | 54 | help='The file name(s) to render. ' |
55 | 55 | 'Separate multiple extensions with commas, or use ' |
56 | | '-n multiple times.') |
| 56 | '-n multiple times.'), |
| 57 | make_option('--extra-context', '-c', dest='extra_context', |
| 58 | action='append', default=[], |
| 59 | help='Extra context to pass to template files to render. ' |
| 60 | 'Must be "variable_name=value". ' |
| 61 | 'You can use that option multiple times.'), |
57 | 62 | ) |
58 | 63 | requires_model_validation = False |
59 | 64 | # Can't import settings during this command, because they haven't |
… |
… |
class TemplateCommand(BaseCommand):
|
110 | 115 | else: |
111 | 116 | docs_version = '%d.%d' % django.VERSION[:2] |
112 | 117 | |
113 | | context = Context(dict(options, **{ |
| 118 | extra_context = dict(map(lambda a: a.split('=', 1), options['extra_context'])) |
| 119 | |
| 120 | context = Context(dict(extra_context, **{ |
114 | 121 | base_name: name, |
115 | 122 | base_directory: top_dir, |
116 | 123 | 'docs_version': docs_version, |