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