示例#1
0
 def __get_member(self, id):
     id = safe_unquote(id)
     member_id, media_id = self.collection.convert_id(id)
     member = self.collection.get_member(member_id)
     if not member:
         raise cherrypy.NotFound()
     return member
示例#2
0
 def remove(self, id):
     id = safe_unquote(id)
     member_id, media_id = self.collection.convert_id(id)
     member = self.collection.get_member(member_id)
     if member:
         self.collection.prune(member.member_id, member.media_id)
         self.collection.store.commit(message="Deleting %s and %s" % (member.member_id,
                                                                      member.media_id))
         
         # Regenerate the collection feed
         self.collection.feed_handler.set(self.collection.feed)