Login

Snippets by ulmus

Snippet List

Localized Shell

For historical reasons, Django commands are hard-coded to use `en-us` regardless of language. This includes the `shell` command and can lead to surprising effects if one assumes the local language to be the one set by `LANGUAGE_CODE`. This snippets can be saved as a management command in any app, for example using the name `lshell` and provides a localized shell controlled by the normal `LANGUAGE_CODE` setting.

Read More

ulmus has posted 1 snippet.