WebFaction
Community site: login faq

What's the accepted way to set the locale, so that my Django app uses the appropriate date format (with USE_L10N = True)?

asked 14 Feb '11, 12:21

delyan
112
accept rate: 0%


What format is it displaying? What format do you want it to display? You can set the time date formats manually with TIME_FORMAT and DATE_FORMAT in settings.py

http://docs.djangoproject.com/en/dev/ref/settings/#date-format
http://docs.djangoproject.com/en/dev/ref/settings/#time-format
permanent link

answered 14 Feb '11, 14:29

johns
5.4k412
accept rate: 23%

It's using the default en_US format and I would've liked it to use the en_GB formats. Currently, I've hardcoded the formats in the way that you propose, however, I'd like to figure out how to do with locales as well.

(14 Feb '11, 16:16) delyan
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×910
×5

question asked: 14 Feb '11, 12:21

question was seen: 4,328 times

last updated: 14 Feb '11, 16:16

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2020 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM