From owner-svn-soc-all@freebsd.org Thu Aug 6 20:58:49 2015 Return-Path: Delivered-To: svn-soc-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E0BCC9B51E9 for ; Thu, 6 Aug 2015 20:58:49 +0000 (UTC) (envelope-from kczekirda@FreeBSD.org) Received: from socsvn.freebsd.org (socsvn.freebsd.org [IPv6:2001:1900:2254:206a::50:2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D1EFC1866 for ; Thu, 6 Aug 2015 20:58:49 +0000 (UTC) (envelope-from kczekirda@FreeBSD.org) Received: from socsvn.freebsd.org ([127.0.1.124]) by socsvn.freebsd.org (8.15.2/8.15.2) with ESMTP id t76KwnlU074574 for ; Thu, 6 Aug 2015 20:58:49 GMT (envelope-from kczekirda@FreeBSD.org) Received: (from www@localhost) by socsvn.freebsd.org (8.15.2/8.15.2/Submit) id t76KwnkQ074558 for svn-soc-all@FreeBSD.org; Thu, 6 Aug 2015 20:58:49 GMT (envelope-from kczekirda@FreeBSD.org) Date: Thu, 6 Aug 2015 20:58:49 GMT Message-Id: <201508062058.t76KwnkQ074558@socsvn.freebsd.org> X-Authentication-Warning: socsvn.freebsd.org: www set sender to kczekirda@FreeBSD.org using -f From: kczekirda@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r289315 - soc2015/kczekirda/www MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-soc-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the entire Summer of Code repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Aug 2015 20:58:50 -0000 Author: kczekirda Date: Thu Aug 6 20:58:48 2015 New Revision: 289315 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=289315 Log: tasks management - take task and changee task status funcions Modified: soc2015/kczekirda/www/menu.py Modified: soc2015/kczekirda/www/menu.py ============================================================================== --- soc2015/kczekirda/www/menu.py Thu Aug 6 19:53:41 2015 (r289314) +++ soc2015/kczekirda/www/menu.py Thu Aug 6 20:58:48 2015 (r289315) @@ -116,7 +116,23 @@ return redirect('/admin') else: return template(delete_task_tpl,revision=revision) - + +@route('/admin/change_status/:revision/:new_status', method='GET') +def change_status(revision,new_status): + conn = sqlite3.connect(database) + c = conn.cursor() + c.execute("UPDATE tasks SET status = ? WHERE revision LIKE ?", (new_status,revision)) + conn.commit() + return redirect('/admin') + +@route('/admin/take_task/:revision/:host', method='GET') +def take_task(revision,host): + conn = sqlite3.connect(database) + c = conn.cursor() + c.execute("UPDATE tasks SET host = ? WHERE revision LIKE ?", (host,revision)) + conn.commit() + return redirect('/admin') + @route('/menu/:mac', method='GET') def static(mac): conn = sqlite3.connect(database)