On Wed, Dec 10, 2014 at 9:57 AM, gerard <gh224...@gmail.com> wrote: > hello all, > > i'm using Django 1.4 LTS, and try to add localisation to my project. > According the doc: > https://docs.djangoproject.com/en/1.4/topics/i18n/translation/#localization-how-to-create-language-files > > i have to do: > django-admin.py makemessages --all > > i did it and have the error: > django-admin.py makemessages -v 3 --traceback --all > --settings=agenda.settings > ... > ImportError: Could not import settings 'agenda.settings' (Is it on > sys.path?): No module named agenda.settings > > but it exists: > $ python manage.py shell > Python 2.7.8 (default, Oct 19 2014, 16:03:53) > [GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.51)] on darwin > Type "help", "copyright", "credits" or "license" for more information. > (InteractiveConsole) >>>> from agenda.settings import * >>>> > > Anybody can help? Thanks in advance, >
"python manage.py makemessages --settings=agenda.settings" I suspect the difference is between running manage.py and running django-admin.py - manage.py might add the directory containing it to sys.path. If you run "python" (rather than manage.py shell) in the directory you are trying to makemessages in, can you import agenda.settings? Cheers Tom -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at http://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAFHbX1JqgRU0D0%2BfwsRVrx6xSzEGad5tou7NiG7Y9yWKk28h2g%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.