Пример #1
0
 def remove_book(self, group_id, book_id):
     group = Group.query_by_id(group_id)
     book = Book.query_by_id(book_id)
     group.remove_book(book)
     return "OK"
Пример #2
0
 def title(self, group_id):
     group = Group.query_by_id(group_id)
     return group.title
Пример #3
0
 def leave(self, group_id):
     user = cherrypy.request.user
     group = Group.query_by_id(group_id)
     with session_scope() as s:
         user.leave_group(s, group)
Пример #4
0
 def remove_book(self, group_id, book_id):
     group = Group.query_by_id(group_id)
     book = Book.query_by_id(book_id)
     group.remove_book(book)
     return "OK"
Пример #5
0
 def title(self, group_id):
     group = Group.query_by_id(group_id)
     return group.title
Пример #6
0
 def leave(self, group_id):
     user = cherrypy.request.user
     group = Group.query_by_id(group_id)
     with session_scope() as s:
         user.leave_group(s, group)