Wednesday, November 9, 2011

Re: initial database sync throws TypeError in createsuperuser

On Wed, Nov 9, 2011 at 4:03 PM, Niels <pro2139@nlsp.xs4all.nl> wrote:
> Worse:
>>>> locale.getdefaultlocale()
> (None, None)
>
> Still i'd say this should be handled better than bailing out with an error.
> Something like .. .decode(locale.getdefaultlocale()[1] or 'ascii', 'ignore')
>

You simply need to set an appropriate LANG in your environment:


> $ env LANG=nl_NL.UTF-8 /usr/local/bin/python
Python 2.7.1 (r271:86832, Dec 13 2010, 15:52:15)
[GCC 4.2.1 20070719 [FreeBSD]] on freebsd8
Type "help", "copyright", "credits" or "license" for more information.
>>> import locale
>>> locale.getdefaultlocale()
('nl_NL', 'UTF-8')


Cheers

Tom

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate