-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d450d67
commit c91ffdb
Showing
3 changed files
with
27 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
from plone.base.interfaces.syndication import IFeed | ||
from plone.app.contenttypes.interfaces import IEvent | ||
from Products.CMFPlone.browser.syndication.adapters import DexterityItem | ||
from zope.component import adapter | ||
from DateTime import DateTime | ||
|
||
|
||
@adapter(IEvent, IFeed) | ||
class EventItem(DexterityItem): | ||
|
||
@property | ||
def startdate(self): | ||
""" | ||
Same format as other dates in | ||
Products.CMFPlone.browser.syndication.adapters | ||
""" | ||
date = self.context.start.isoformat() | ||
if date: | ||
return DateTime(date) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters