mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] [PATCH 1/4] python-django: install __init__.py for locales
@ 2015-09-17  5:54 Robert Schwebel
  0 siblings, 0 replies; only message in thread
From: Robert Schwebel @ 2015-09-17  5:54 UTC (permalink / raw)
  To: ptxdist; +Cc: Robert Schwebel

Without this patch, 'manage.py collectstatic' breaks with Django 1.8:

Traceback (most recent call last):
File "/usr/bin/manage-ptxweb.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/usr/lib/python2.7/site-packages/django/core/management/__init__.py", line 338, in execute_from_command_line
utility.execute()
File "/usr/lib/python2.7/site-packages/django/core/management/__init__.py", line 330, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/usr/lib/python2.7/site-packages/django/core/management/base.py", line 390, in run_from_argv
self.execute(*args, **cmd_options)
File "/usr/lib/python2.7/site-packages/django/core/management/base.py", line 433, in execute
saved_locale = translation.get_language()
File "/usr/lib/python2.7/site-packages/django/utils/translation/__init__.py", line 173, in get_language
return _trans.get_language()
File "/usr/lib/python2.7/site-packages/django/utils/translation/__init__.py", line 57, in __getattr__
from django.utils.translation import trans_real as trans
File "/usr/lib/python2.7/site-packages/django/utils/translation/trans_real.py", line 14, in <module>
from django.conf.locale import LANG_INFO
ImportError: No module named locale

Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
---
 rules/python-django.make | 1 +
 1 file changed, 1 insertion(+)

diff --git a/rules/python-django.make b/rules/python-django.make
index ae5946e..17df0c3 100644
--- a/rules/python-django.make
+++ b/rules/python-django.make
@@ -54,6 +54,7 @@ $(STATEDIR)/python-django.targetinstall:
 	done
 
 #	# locales
+	$(call install_copy, python-django, 0, 0, 0644, -, $(PYTHON_DJANGO_PYTHON_PATH)/conf/locale/__init__.py)
 	@cd "$(PYTHON_DJANGO_PKGDIR)$(PYTHON_DJANGO_PYTHON_PATH)" && \
 	find -type d -name locale -printf '%P\n' | while read localedir; do \
 		for locale in $(call remove_quotes, $(PTXCONF_PYTHON_DJANGO_LOCALES)); do \
-- 
2.1.4


-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-09-17  5:54 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-17  5:54 [ptxdist] [PATCH 1/4] python-django: install __init__.py for locales Robert Schwebel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox