Hi Ken,

Thanks for your reply.

I git cloned my live site’s code to a new development server so that I can add 
some more features, and at the same time test it out on a BSD OS (live site’s 
running Debian).

Running the site via gunicorn gave me the locale error, so I tried running it 
as ./manage.py runserver to see if it made a difference. In this case the error 
was the same.

On the live server, Django + Cartridge + Mezzanine is using “en_GB” for the 
locale but for some reason it’s not available on the development machine. 

locale -a doesn’t list either “en_US” or “en_GB”, but rather:
en_US.ISO8859-1
en_US.ISO8859-15
en_US.UTF-8
en_GB.ISO8859-1
en_GB.ISO8859-15
en_GB.UTF-8

Therefore one-by-one, I tried setting SHOP_CURRENCY_LOCALE to each of the above 
and exporting LOCAL and LC_CTYPE to the same, without success.

Initially I suspected that it’ll only work with en_GB and en_US without the 
suffixes (eg en_US.UTF-8) but I see on the fabfile.py that "en_US.UTF-8” is 
being used.

Still not sure what to do.

Cartridge, Mezzanine and Django are up to date on the dev machine.

-- 
Eric Boo
Sent with Airmail

On 4 July, 2014 at 8:46:23 pm, Ken Bolton ([email protected]) wrote:

Hi Eric,

Mezzanine's Fabric script, fabfile.py, has code that sets the locale properly. 
Search for the string "locale" in 
https://github.com/stephenmcd/mezzanine/blob/master/mezzanine/project_template/fabfile.py.

Your initial email is a little vague. Are you running a Django development 
server, aka "runserver"? Or are you running a development server identical to 
your final deployed production server?

ken


On Fri, Jul 4, 2014 at 3:53 AM, Eric Boo <[email protected]> wrote:
Just a note:
locale -a has 

en_US.ISO8859-1
en_US.ISO8859-15
en_US.UTF-8
en_GB.ISO8859-1
en_GB.ISO8859-15
en_GB.UTF-8


On Friday, 4 July 2014 15:51:38 UTC+8, Eric Boo wrote:
Hi,

I just tried to set up a dev server on a new VPS and am seeing the following 
when I run ./manage.py runserver

django.core.exceptions.ImproperlyConfigured: Invalid currency locale specified 
for SHOP_CURRENCY_LOCALE: 'en_US.ISO8859-1'. You'll need to set the locale for 
your system, or configure the SHOP_CURRENCY_LOCALE setting in your settings 
module.


I have these in my environment:

declare -x LC_CTYPE="en_US.ISO8859-1"
declare -x LOCALE="en_US.ISO8859-1"


This is the same even if I change the SHOP_CURRENCY_LOCALE to en_US.UTF-8, or 
en_GB.UTF-8 and when I change the environment variables accordingly.

Any ideas?



Eric

--
You received this message because you are subscribed to the Google Groups 
"Mezzanine Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google 
Groups "Mezzanine Users" group.
To unsubscribe from this topic, visit 
https://groups.google.com/d/topic/mezzanine-users/ahNvEvQkV8s/unsubscribe.
To unsubscribe from this group and all its topics, send an email to 
[email protected].
For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"Mezzanine Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to