1
0
Fork 0
forked from github/pelican

Metadata, not metadatas.

This commit is contained in:
Alexis Metaireau 2011-05-07 20:00:30 +01:00
commit 52f2a8383a
4 changed files with 29 additions and 29 deletions

View file

@ -4,21 +4,21 @@ from pelican.log import *
class Page(object):
"""Represents a page
Given a content, and metadatas, create an adequate object.
Given a content, and metadata, create an adequate object.
:param string: the string to parse, containing the original content.
:param markup: the markup language to use while parsing.
"""
mandatory_properties = ('title',)
def __init__(self, content, metadatas={}, settings={}, filename=None):
def __init__(self, content, metadata={}, settings={}, filename=None):
self._content = content
self.translations = []
self.status = "published" # default value
local_metadata = dict(settings['DEFAULT_METADATA'])
local_metadata.update(metadatas)
local_metadata.update(metadata)
for key, value in local_metadata.items():
setattr(self, key.lower(), value)