Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for #701: adds a 'strftime' jinja fiter that uses LOCALE #860

Merged
merged 4 commits into from
Apr 23, 2013

Conversation

avaris
Copy link
Member

@avaris avaris commented Apr 21, 2013

This PR adds a new Jinja filter strftime that will solve the issue #701. Built-in strftime wasn't using the locale set by Pelican while rendering (probably because of some sandboxing done by Jinja).

Usage:

# settings
LOCALE = "pt_BR.utf8"

# template
{{ article.date.strftime('%B de %Y') }}
{{ article.date|strftime('%B de %Y') }}

# output
December de 2012
dezembro de 2012

justinmayer added a commit that referenced this pull request Apr 23, 2013
Fix for #701: adds a 'strftime' jinja fiter that uses LOCALE
@justinmayer justinmayer merged commit be511c9 into getpelican:master Apr 23, 2013
@avaris avaris deleted the strftime-jinja-filter branch April 23, 2013 03:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants