Fix #65. Unicode, grr. Thanks Bruno Bord.

This commit is contained in:
Alexis Metaireau 2011-02-01 22:49:33 +00:00
commit 06246d1aa4
6 changed files with 9 additions and 6 deletions

View file

@ -1,3 +1,4 @@
# -*- coding: utf-8 -*-
from pelican.utils import slugify, truncate_html_words
@ -53,6 +54,9 @@ class Page(object):
else:
self.date_format = settings['DEFAULT_DATE_FORMAT']
if hasattr(self, 'date'):
self.locale_date = self.date.strftime(self.date_format).decode('utf')
# store the settings ref.
self._settings = settings
@ -74,10 +78,6 @@ class Page(object):
def summary(self):
return truncate_html_words(self.content, 50)
@property
def locale_date(self):
return self.date.strftime(self.date_format)
class Article(Page):

View file

@ -1,3 +1,4 @@
# -*- coding: utf-8 -*-
from operator import attrgetter
from itertools import chain
from functools import partial

View file

@ -1,3 +1,4 @@
# -*- coding: utf-8 -*-
from docutils import core
from markdown import Markdown
import re

View file

@ -1,3 +1,4 @@
# -*- coding: utf-8 -*-
import os
import locale

View file

@ -2,7 +2,7 @@ This is a super article !
#########################
:tags: foo, bar, foobar
:date: 2010-10-02 10:14
:date: 2010-12-02 10:14
:category: yeah
:author: Alexis Métaireau

View file

@ -7,7 +7,7 @@ GITHUB_URL = 'http://github.com/ametaireau/'
DISQUS_SITENAME = "blog-notmyidea"
PDF_GENERATOR = False
REVERSE_CATEGORY_ORDER = True
LOCALE = 'en_US.utf8'
LOCALE = 'fr_FR.utf8'
LINKS = (('Biologeek', 'http://biologeek.org'),
('Filyb', "http://filyb.info/"),