forked from github/pelican
Removed AUTHOR defaulting to OS User /John Doe, so both a blank or undefined (None) author is possible.
Reverted templates back to checking author object, since a None object is possible. Name could be checked for blank if required ATOM spec states an author element should be provided, so passes a blank name if not specified Updated unit test
This commit is contained in:
parent
94877e033b
commit
f7a2f8ea47
7 changed files with 18 additions and 19 deletions
|
|
@ -53,11 +53,6 @@ class Page(object):
|
|||
if not hasattr(self, 'author'):
|
||||
if 'AUTHOR' in settings:
|
||||
self.author = Author(settings['AUTHOR'], settings)
|
||||
else:
|
||||
title = filename.decode('utf-8') if filename else self.title
|
||||
self.author = Author(getenv('USER', 'John Doe'), settings)
|
||||
logger.warning(u"Author of `{0}' unknown, assuming that his name is "
|
||||
"`{1}'".format(title, self.author))
|
||||
|
||||
# manage languages
|
||||
self.in_default_lang = True
|
||||
|
|
@ -120,7 +115,7 @@ class Page(object):
|
|||
'slug': getattr(self, 'slug', ''),
|
||||
'lang': getattr(self, 'lang', 'en'),
|
||||
'date': getattr(self, 'date', datetime.now()),
|
||||
'author': self.author,
|
||||
'author': getattr(self, 'author', ''),
|
||||
'category': getattr(self, 'category', 'misc'),
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue