Example #1
0
 def __init__(self, id, trashed, app, authors, title, duration,
              description):
     super().__init__(id=id, trashed=trashed, app=app)
     Editable.__init__(self, authors=authors)
     self.title = title
     self.duration = duration
     self.description = description
Example #2
0
 def __init__(self, *, id, app, authors, title, description, features, mode, activity):
     super().__init__(id=id, app=app)
     Editable.__init__(self, authors=authors, activity=activity)
     self.title = title
     self.description = description
     self.features = features
     self.mode = mode
     self.items = List.Items((self, 'items'))
     self.activity = activity
     self.activity.post = self._on_activity_publish
     self.activity.host = self
Example #3
0
    def __init__(self, id, trashed, app, authors, title, time, location, description):
        super().__init__(id=id, trashed=trashed, app=app)
        Editable.__init__(self, authors=authors)
        self.title = title
        self.time = time
        self.location = location
        self.description = description

        self._items_key = self.id + '.items'
        self._trashed_items_key = self.id + '.trashed_items'
        self.items = JSONRedisMapping(self.app.r, self._items_key)
        self.trashed_items = JSONRedisMapping(self.app.r, self._trashed_items_key)
Example #4
0
 def __init__(self, *, id, app, authors, trashed, text, resource, list_id, title, location,
              checked):
     super().__init__(id, app)
     Editable.__init__(self, authors, lambda: self.list.activity)
     Trashable.__init__(self, trashed, lambda: self.list.activity)
     WithContent.__init__(self, text=text, resource=resource)
     self._list_id = list_id
     self.title = title
     self.location = Location.parse(location) if location else None
     self.checked = checked
     self.assignees = Item.Assignees(self, app=app)
     self.votes = Item.Votes(self, app=app)
Example #5
0
    def __init__(self, id, trashed, app, authors, title, time, location,
                 description):
        super().__init__(id=id, trashed=trashed, app=app)
        Editable.__init__(self, authors=authors)
        self.title = title
        self.time = parse_isotime(time) if time else None
        self.location = location
        self.description = description

        self._items_key = self.id + '.items'
        self._trashed_items_key = self.id + '.trashed_items'
        self.items = JSONRedisMapping(self.app.r, self._items_key)
        self.trashed_items = JSONRedisMapping(self.app.r,
                                              self._trashed_items_key)
Example #6
0
 def __init__(self,
              *,
              id,
              app,
              authors,
              trashed,
              text,
              resource,
              list_id,
              title,
              location=None,
              checked):
     # Compatibility for Item without location (deprecated since 0.6.0)
     super().__init__(id, app)
     Editable.__init__(self, authors, lambda: self.list.activity)
     Trashable.__init__(self, trashed, lambda: self.list.activity)
     WithContent.__init__(self, text=text, resource=resource)
     self._list_id = list_id
     self.title = title
     self.location = Location.parse(location) if location else None
     self.checked = checked
Example #7
0
 def __init__(self, id, trashed, app, authors, name):
     super().__init__(id=id, trashed=trashed, app=app)
     Editable.__init__(self, authors=authors)
     self.name = name
Example #8
0
 def __init__(self, id, trashed, app, authors, title, duration, description):
     super().__init__(id=id, trashed=trashed, app=app)
     Editable.__init__(self, authors=authors)
     self.title = title
     self.duration = duration
     self.description = description
Example #9
0
 def __init__(self, *, app: Hello, **data: object) -> None:
     super().__init__(id=cast(str, data['id']), app=app)
     Editable.__init__(self, authors=cast(List[str], data['authors']))
     WithContent.__init__(self, text=cast(Optional[str], data['text']),
                          resource=cast(Optional[Resource], data['resource']))
Example #10
0
 def __init__(self, *, id, app, authors, text, resource):
     super().__init__(id, app)
     Editable.__init__(self, authors)
     WithContent.__init__(self, text=text, resource=resource)