示例#1
0
文件: calendar.py 项目: iotest3/new
 def __init__(self,
              title,
              startDate,
              endDate,
              creator,
              text=u'',
              location=u'',
              attendees=[],
              contact_name=u'',
              contact_email=u'',
              calendar_category=u''):
     Folder.__init__(self)
     self.title = unicode(title)
     self.startDate = startDate
     self.endDate = endDate
     self.location = location
     self.attendees = attendees
     self.contact_name = contact_name
     self.contact_email = contact_email
     self.creator = unicode(creator)
     self.modified_by = self.creator
     if text is None:
         self.text = u''
     else:
         self.text = unicode(text)
     self.calendar_category = calendar_category
     self['attachments'] = AttachmentsFolder()
示例#2
0
 def __init__(self, title, description, creator):
     Folder.__init__(self)
     self.title = unicode(title)
     self.description = unicode(description)
     self.creator = unicode(creator)
     self.modified_by = self.creator
     self.ordering = Ordering()
示例#3
0
文件: evolve7.py 项目: Falmarri/karl
def evolve(context):
    """
    Upgrades required for new Image Drawer functionality.
    """
    # Add IImage marker to instances of ICommunityFile which are images.
    catalog = find_catalog(context)
    search = ICatalogSearch(context)
    cnt, docids, resolver = search(interfaces=[ICommunityFile])
    for docid in docids:
        obj = resolver(docid)
        if obj is None:
            continue  # Work around catalog bug
        obj._init_image()
        if obj.is_image:
            print "Image: %s" % resource_path(obj)
            catalog.reindex_doc(obj.docid, obj)

    # Convert WikiPages to Folders so they can contain attachments
    cnt, docids, resolver = search(interfaces=[IWikiPage])
    for docid in docids:
        obj = resolver(docid)
        if obj is None:
            continue # Work around catalog bug
        print "Convert wiki page to folder: %s" % resource_path(obj)
        Folder.__init__(obj)
        catalog.reindex_doc(obj.docid, obj)
示例#4
0
def evolve(context):
    """
    Upgrades required for new Image Drawer functionality.
    """
    # Add IImage marker to instances of ICommunityFile which are images.
    catalog = find_catalog(context)
    search = ICatalogSearch(context)
    cnt, docids, resolver = search(interfaces=[ICommunityFile])
    for docid in docids:
        obj = resolver(docid)
        if obj is None:
            continue  # Work around catalog bug
        obj._init_image()
        if obj.is_image:
            print "Image: %s" % resource_path(obj)
            catalog.reindex_doc(obj.docid, obj)

    # Convert WikiPages to Folders so they can contain attachments
    cnt, docids, resolver = search(interfaces=[IWikiPage])
    for docid in docids:
        obj = resolver(docid)
        if obj is None:
            continue  # Work around catalog bug
        print "Convert wiki page to folder: %s" % resource_path(obj)
        Folder.__init__(obj)
        catalog.reindex_doc(obj.docid, obj)
示例#5
0
文件: page.py 项目: araymund/karl
 def __init__(self, title, text, description, creator):
     Folder.__init__(self)
     assert title is not None
     assert text is not None
     assert description is not None
     assert creator is not None
     self.title = unicode(title)
     self.text = unicode(text)
     self.description = unicode(description)
     self.creator = unicode(creator)
     self.modified_by = self.creator
     # We might choose to make this more article-ish in KARL3
     self["attachments"] = AttachmentsFolder()
示例#6
0
文件: page.py 项目: iotest3/new
 def __init__(self, title, text, description, creator):
     Folder.__init__(self)
     assert title is not None
     assert text is not None
     assert description is not None
     assert creator is not None
     self.title = unicode(title)
     self.text = unicode(text)
     self.description = unicode(description)
     self.creator = unicode(creator)
     self.modified_by = self.creator
     # We might choose to make this more article-ish in KARL3
     self['attachments'] = AttachmentsFolder()
示例#7
0
文件: calendar.py 项目: Falmarri/karl
 def __init__(self, title, startDate, endDate, creator,
              text=u'', location=u'', attendees=[],
              contact_name = u'', contact_email = u'',
              calendar_category=u''):
     Folder.__init__(self)
     self.title = unicode(title)
     self.startDate = startDate
     self.endDate = endDate
     self.location = location
     self.attendees = attendees
     self.contact_name = contact_name
     self.contact_email = contact_email
     self.creator = unicode(creator)
     self.modified_by = self.creator
     if text is None:
         self.text = u''
     else:
         self.text = unicode(text)
     self.calendar_category = calendar_category
     self['attachments'] = AttachmentsFolder()
示例#8
0
 def __init__(self, **kw):
     Folder.__init__(self)
     super(Content, self).__init__(**kw)
示例#9
0
 def __init__(self, **kw):
     #To set that this should keep track of ordering. See Folder
     #If _order is set to None, ordering isn't stored
     self._order = ()
     Folder.__init__(self)
     super(Content, self).__init__(**kw)
示例#10
0
文件: folder.py 项目: dbaty/Petrel
 def __init__(self, *args, **kwargs):
     BaseContent.__init__(self)
     BaseFolder.__init__(self, *args, **kwargs)
示例#11
0
 def __init__(self, **kw):
     Folder.__init__(self)
     super(Content, self).__init__(**kw)