Beispiel #1
0
 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()
Beispiel #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()
Beispiel #3
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)
Beispiel #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)
Beispiel #5
0
 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()
Beispiel #6
0
 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()
Beispiel #7
0
 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()
Beispiel #8
0
 def __init__(self, **kw):
     Folder.__init__(self)
     super(Content, self).__init__(**kw)
Beispiel #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)
Beispiel #10
0
 def __init__(self, *args, **kwargs):
     BaseContent.__init__(self)
     BaseFolder.__init__(self, *args, **kwargs)
Beispiel #11
0
 def __init__(self, **kw):
     Folder.__init__(self)
     super(Content, self).__init__(**kw)