Skip to content

Commit

Permalink
Serialize packages before giving it to Django (#39)
Browse files Browse the repository at this point in the history
It should fix #38, thanks @askoretskiy
  • Loading branch information
askoretskiy authored and Sébastien Fievet committed May 31, 2018
1 parent fa65ede commit 0b0a485
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/statici18n/management/commands/compilejsi18n.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def _create_javascript_catalog(self, locale, domain, packages):
response = render_javascript_catalog(catalog, plural)
else:
catalog = JavaScriptCatalog()
packages = None if packages == 'django.conf' else packages
packages = None if packages == 'django.conf' else packages.join('+')
# we are passing None as the request, as the request object is currently not used by django
response = catalog.get(self, None, domain=domain, packages=packages)
return force_text(response.content)
Expand All @@ -75,7 +75,7 @@ def _create_json_catalog(self, locale, domain, packages):
return force_text(json.dumps(data, ensure_ascii=False))
else:
catalog = JSONCatalog()
packages = None if packages == 'django.conf' else packages
packages = None if packages == 'django.conf' else packages.join('+')
# we are passing None as the request, as the request object is currently not used by django
response = catalog.get(self, None, domain=domain, packages=packages)
return force_text(response.content)
Expand Down

0 comments on commit 0b0a485

Please sign in to comment.