diff options
| author | Alvin Lindstam <alvin@kundo.se> | 2016-10-22 19:20:24 -0400 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2016-10-22 19:26:08 -0400 |
| commit | 6b5106b1ceec03d945c1104b21feed3e25470fe0 (patch) | |
| tree | 41b1774f38285e795dd80e9ba161b197e59f5d19 /django/views | |
| parent | 9b9c8c4a81ab67d1bc392b6fd9cc17e0b844f7ff (diff) | |
| download | django-6b5106b1ceec03d945c1104b21feed3e25470fe0.tar.gz | |
Fixed #27374 -- Made JavaScriptCatalog respect the packages argument.
Diffstat (limited to 'django/views')
| -rw-r--r-- | django/views/i18n.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/django/views/i18n.py b/django/views/i18n.py index eda8422f69..c8cc5d043f 100644 --- a/django/views/i18n.py +++ b/django/views/i18n.py @@ -356,7 +356,8 @@ class JavaScriptCatalog(View): domain = kwargs.get('domain', self.domain) # If packages are not provided, default to all installed packages, as # DjangoTranslation without localedirs harvests them all. - packages = kwargs.get('packages', '').split('+') or self.packages + packages = kwargs.get('packages', '') + packages = packages.split('+') if packages else self.packages paths = self.get_paths(packages) if packages else None self.translation = DjangoTranslation(locale, domain=domain, localedirs=paths) context = self.get_context_data(**kwargs) |
