Trees | Indices | Help |
|
---|
|
1 #!/usr/bin/env python 2 # -*- coding: utf-8 -*- 3 # 4 # 5 # 6 # Copyright (c) 2008-2011 University of Dundee. 7 # 8 # This program is free software: you can redistribute it and/or modify 9 # it under the terms of the GNU Affero General Public License as 10 # published by the Free Software Foundation, either version 3 of the 11 # License, or (at your option) any later version. 12 # 13 # This program is distributed in the hope that it will be useful, 14 # but WITHOUT ANY WARRANTY; without even the implied warranty of 15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 # GNU Affero General Public License for more details. 17 # 18 # You should have received a copy of the GNU Affero General Public License 19 # along with this program. If not, see <http://www.gnu.org/licenses/>. 20 # 21 # Author: Aleksandra Tarkowska <A(dot)Tarkowska(at)dundee(dot)ac(dot)uk>, 2008. 22 # 23 # Version: 1.0 24 # 25 26 from django.core.urlresolvers import reverse 27 28 from webclient.controller import BaseController 2931 32 imageInBasket = None 33 34 imgSize = 0 35 dsSize = 0 36 prSize = 0 37 sizeOfBasket = 0 38 415943 imInBasket = list() 44 dsInBasket = list() 45 prInBasket = list() 46 47 for imgId in request.session['imageInBasket']: 48 imInBasket.append(imgId) 49 #for dsId in request.session['datasetInBasket']: 50 # dsInBasket.append(dsId) 51 52 if len(imInBasket) > 0: 53 self.imageInBasket = list(self.conn.getObjects("Image", imInBasket)) 54 self.imgSize = len(self.imageInBasket) 55 #if len(dsInBasket) > 0: 56 # self.datasetInBasket = list(self.conn.getDatasetsWithImages(dsInBasket)) 57 # self.dsSize = len(self.datasetInBasket) 58 self.sizeOfBasket = self.imgSize#+self.dsSize
Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Tue Sep 23 15:05:01 2014 | http://epydoc.sourceforge.net |