Esempio n. 1
0
 def members_delete(self, project_id, user_id):
     membership = DBSession.query(ProjectMembership).filter_by(project_id=project_id,
                                                               user_id=user_id).one()
     DBSession.delete(membership)
     return dict(_status=u'ok',
                 _msg=u'El usuario "%s" ha sido removido del proyecto' % membership.user.name)
Esempio n. 2
0
 def delete(self, file_id):
     file = DBSession.query(File).filter_by(id=file_id).one()
     DBSession.delete(file)
     flash(_('The file "%s" has been deleted from the project.' % file.filename))
     redirect(url('/projects/view/%d' % file.project.id))