class IWikiPage(IFolder, ICommunityContent, IPages): """A page using wiki markup """ taggedValue('name', 'Wiki Page') taggedValue('search_option', True) taggedValue('icon', 'wiki.png') text = Attribute(u'Text -- includes wiki markup.')
class IBlogEntry(ICommunityContent, IPosts): """A folder for a blog entry and its comments o The `comments` key returns a CommentsFolder o The `attachments` key returns an AttachmentsFolder """ taggedValue('name', 'Blog Entry') taggedValue('search_option', True) taggedValue('icon', 'blog.png')
class ICommunityFile(ICommunityContent, IFiles): """A file in a community""" taggedValue('name', 'File') taggedValue('search_option', True) taggedValue('icon', 'blue-document-text.png') blobfile = Attribute(u'Optional file attachment') mimetype = Attribute(u'Content type') filename = Attribute(u'Uploaded filename') size = Attribute(u'Size in bytes')
class ICommunity(IFolder, IContent, IOthers): """ Community folder """ taggedValue('name', 'Community') taggedValue('search_option', True) taggedValue('icon', 'building.png') taggedValue('marker', 'Community') description = Attribute(u'Description -- plain text summary') text = Attribute(u'Text -- includes wiki markup.') content_modified = Attribute( u'datetime: last modification to any subcontent ')
class INewsItem(ICommunityContent, IFolder): """ A news item. """ taggedValue('name', 'News Item') taggedValue('search_option', True) taggedValue('icon', 'newspaper.png') title = Attribute(u'Title of news item.') text = Attribute(u'Body of news item.') publication_date = Attribute(u'Date item was (will be) published.') creator = Attribute(u'User id of user that created this news item.') caption = Attribute(u'Caption that appears under photo for this article.')
class IUserProfile( IProfileAvatarURL, # pylint:disable=too-many-ancestors IUserContactProfile, IFriendlyNamed, IRootInterface): """A user profile""" taggedValue('__external_class_name__', 'UserProfile')
class ISite(IFolder): """ Karl site """ taggedValue('name', 'Site') list_aliases = Attribute("Mailng list address -> path") def update_indexes(): """Add and remove catalog indexes to match a fixed schema"""
class ICalendarEvent(ICommunityContent, IOthers): """A folder for a calendar event""" taggedValue('name', 'Event') taggedValue('search_option', True) taggedValue('icon', 'calendar-select.png') taggedValue('marker', 'Event') title = Attribute(u'Event title') startDate = Attribute(u'DateTime object with value from form') endDate = Attribute(u'DateTime object with value from form') text = Attribute(u'Text description of event.') location = Attribute(u'Location of event.') attendees = Attribute(u'List of names of people attending event.') contact_name = Attribute(u'Name of person to contact about this event.') contact_email = Attribute(u'Email of person to contact about this event.') creator = Attribute(u'User id of user that created this event.') calendar_category = Attribute("Name of the associated calendar category")
class IStoryPageKind(IPagePageKind): """A story page. You must still manually opt-in to using the story template in the post metadata or site configuration. """ # 'story_page' and 'page_page' in pagekind interface.taggedValue('__pagekinds__', (u'page_page', u'story_page',))
class IArchiveIndexPageKind(IIndexPageKind, IArchivePageKind): """ When archives are indexes. ARCHIVES_ARE_INDEXES = True """ interface.taggedValue('__pagekinds__', (u'index', u'archive_page'))
class IBookPageKind(IStoryPageKind): """ A book page. Note that this doesn't actually have its own pagekinds value, it's specified by setting 'template:book.tmpl' in the post metadata. """ interface.taggedValue('__pagekinds__', (u'page_page', u'story_page', u'book_page'))
class IPageKind(interface.Interface): """ The type of page being rendered. Specific types of pages will have a more specific interface. This is similar to IBrowserLayer concept in Zope 3. """ interface.taggedValue('__pagekinds__', ())
class IFeedEntry(Interface): taggedValue('name', 'Feed Entry') title = Attribute('Title') summary = Attribute('Summary') link = Attribute('Link to source HTML page') id = Attribute('Globally unique entry identifier') content_html = Attribute('The content as a sanitized HTML string') published = Attribute('Publication date as a datetime') updated = Attribute('Last update as a datetime') def update(parser_entry): """Change the content to match a FeedParser entry.
class ITemplateEngine(interface.Interface): extensions = interface.Attribute("A list of file extensions") def compile(template, encoding="utf-8", filename=None): """ Compile the template. Returns a callable object that takes an object and returns the unicode string result of rendering it. :param template: A string representing the template. If it is a byte string, it should be decoded according to *encoding*. :keyword str filename: If not-None, the path to the file the template was loaded from. This can help engines generate better error messages. """ taggedValue("engine_type", None)
class IFeed(IContent): taggedValue('name', 'Feed') title = Attribute('Title') subtitle = Attribute('Subtitle') link = Attribute('Link to source HTML page') etag = Attribute('Etag (bandwidth optimization)') feed_modified = Attribute('Last-modified date (bandwidth optimization)') entries = Attribute('List of contained IFeedEntry objects') old_uri = Attribute('Old feed URI (set if the feed moves or disappears)') new_uri = Attribute('New feed URI (set if the feed moves or disappears)') def update(parser): """Change the content to match a FeedParser result.
class IAddress(IRootInterface): full_name = ValidTextLine(title=u"First name", required=True) street_address_1 = ValidTextLine(title=u"Street line 1", max_length=75, required=True) street_address_2 = ValidTextLine(title=u"Street line 2", required=False, max_length=75) city = ValidTextLine(title=u"City name", required=True) state = ValidTextLine(title=u"State name", required=False, max_length=10) postal_code = ValidTextLine(title=u"Postal code", required=False, max_length=30) country = ValidTextLine(title=u"Nation name", required=True) taggedValue('__external_class_name__', 'Address')
class ICommentKindDisqus(ICommentKindAllowed): """ Use disqus comments. """ interface.taggedValue('__comment_system__', 'disqus')
class ICommentKindAllowed(interface.Interface): """ Comments are allowed on this view. """ interface.taggedValue('__comment_system__', None)
class IPostPage(IPost, IPageKind): """ A page being rendered for a post. """ interface.taggedValue('__pagekinds__', ())
class IPagePageKind(IPageKind): """A page""" # 'page_page' in pagekind interface.taggedValue('__pagekinds__', (u'page_page',))
class ITagsPageKind(IPageKind): "The page for listing tags" # 'list' and 'tags_page' in pagekind interface.taggedValue('__pagekinds__', (u'list', u'tags_page'))
class IMainIndexPageKind(IIndexPageKind): """The main index""" # 'index' and 'main_index' in pagkeind interface.taggedValue('__pagekinds__', (u'index', u'main_index'))
class IIndexPageKind(IPageKind): """An index page""" # 'index' in pagkekind interface.taggedValue('__pagekinds__', (u'index',))
class IArchivePageKind(IListPageKind): """An archive page""" # 'list' and 'archive_page' in pagekind interface.taggedValue('__pagekinds__', (u'list', u'archive_page'))
class IListingPageKind(IPageKind): """A listing page""" # 'listing' in pagkeind interface.taggedValue('__pagekinds__', (u'listing',))
class ITagPageKind(IPageKind): """The page for listing a tag""" # 'list' and 'tag_page' in pagkeind interface.taggedValue('__pagekinds__', (u'list', u'tag_page'))
class ICommentKindFacebook(ICommentKindAllowed): """ Use Facebook comments. """ interface.taggedValue('__comment_system__', 'facebook')
class IPostPageKind(IPageKind): """A blog post""" # 'post_page' in pagekind interface.taggedValue('__pagekinds__', (u'post_page',))
class IGalleryPageKind(IPageKind): """A gallery page""" # 'gallery_page' in pagkeind interface.taggedValue('__pagekinds__', (u'gallery_page',))
class IAuthorPageKind(IPageKind): "The page for listing an author" # 'list' and 'author_page' in pagkeind interface.taggedValue('__pagekinds__', (u'list', u'author_page'))