|
|
__init__(self,
collection,
id=None,
atom=None,
media_type=None)
Represents in amplee an AtomPub member resource and provides a
fairly extensive API to manipulate it. |
source code
|
|
|
int
|
__cmp__(self,
other)
By default members are compared following their app:edited
element, but you can change that behavior by setting the
self.comparer attribute to a callable that will perform
the comparison. |
source code
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
from_entry(self,
entry,
info=None)
Allows the filling of the current instance from an Atom entry. |
source code
|
|
|
|
|
|
string
|
|
|
|
|
|
|
inherit_categories_from_collection(self)
Inserts the collection categories into the Atom entry. |
source code
|
|
|
|
|
|
|
update_dates(self)
Sets the updated and edited date values to the current UTC
time. |
source code
|
|
|
|
merge_dates(self,
new_member)
Sets the updated and edited date values to the values from the
member provided. |
source code
|
|
amara.bindery.root_base
|
prepare_for_public(self,
content=None,
external_content=False,
rel=u'alternate',
media_type=u'text/html',
xslt_path=None)
Generates and returns an atom entry that is appropriate to be used
in a public atom feed while retaining information from the member
atom entry. |
source code
|
|
|
|
index(self)
Passes the member to the collection indexers. |
source code
|
|
|
string or NoneType
|
|
|
string or NoneType
|
|
|
string or NoneType
|
|
|
string or NoneType
|
|
|
bool
|
is_draft(self)
Returns True is the entry has a
app:control element with an app:draft element which has
a text value set to yes. |
source code
|
|
|
|
|
amara.bindery.root_base
|
create_entry(self,
source,
**kwargs)
Generates the member atom entry from the provided source (an atom
entry) and slug. |
source code
|
|
amara.bindery.root_base
|
create_entry_from(self,
source,
existing_member,
**kwargs)
Called to generate the new member entry from the atom entry
provided in the source parameter as well as from the existing member
in the store. |
source code
|
|
amara.bindery.root_base
|
generate_entry(self,
source,
existing_member=None,
**kwargs)
Generates the member atom entry from the provided source (an atom
entry) Returns the content of source as a string. |
source code
|
|
|
same as source
|
create_mle(self,
source,
**kwargs)
Creates the Media Link Entry (MLE) associated with the media
resource. |
source code
|
|
|
same as source
|
create_mle_from(self,
source,
existing_member,
**kwargs)
Create the Media Link Entry (MLE) associated with the media
resource extracting some meta-data from the provided
``existing_member``. |
source code
|
|
|
same as source
|
generate_mle(self,
source,
existing_member=None,
**kwargs)
Create the Media Link Entry (MLE) associated with the media
resource, and if existing_member is provided, some of
the atom entry meta-data are extrected from it. |
source code
|
|
|
bool
|
is_entry_mimetype(self,
media_type)
Checks that media_type belongs to
['application/atom+xml;type=entry',
'application/atom+xml']. |
source code
|
|
|
object
|
|
|
unicode
|
generate_atom_id(self,
entry=None,
slug=None)
Called to generate a valid atom identifier (a valid URI) which
will be used within the Atom entry itself. |
source code
|
|
|
unicode
|
generate_resource_id(self,
entry=None,
slug=None,
info=None)
Called to generate a token that will be used as the internal
identifier for this member within its collection. |
source code
|
|
|
Inherited from object:
__delattr__,
__getattribute__,
__hash__,
__new__,
__reduce__,
__reduce_ex__,
__repr__,
__setattr__,
__str__
|