Re: local variable 'qft' referenced before assignment

2011-01-24 Thread Trevor Stanley
Rainy Yes I think you and Bruno have helped me look at it all over again and I will certainly get into Python so I can understand it more fully. I have not ever programmed before and although I have tried to seek local authority courses and other types of training it seems they are not there

Re: local variable 'qft' referenced before assignment

2011-01-24 Thread Rainy
On Jan 24, 1:46 pm, Trevor Stanley wrote: > Bruno > > I will take your advice and seek out some Python literature.  I did run > through an online Python tutorial about a year ago.  I should probably > go through it again as I may understand it more now. > > Thanks, even though your delivery is rat

Re: local variable 'qft' referenced before assignment

2011-01-24 Thread Trevor Stanley
Bruno I will take your advice and seek out some Python literature. I did run through an online Python tutorial about a year ago. I should probably go through it again as I may understand it more now. Thanks, even though your delivery is rather blunt - Trevor bruno desthuilliers wrote: On

Re: local variable 'qft' referenced before assignment

2011-01-23 Thread bruno desthuilliers
On 23 jan, 23:20, Trevor Stanley wrote: > Thanks Bruno for the critique and you are right I don't know what I'm > doing and I am rather learning by accident.  I am not a programmer and > don't profess to be one(yet).  I have built the apps in the excellent > book, Practical Django Projects and I h

Re: local variable 'qft' referenced before assignment

2011-01-23 Thread Trevor Stanley
Thanks Bruno for the critique and you are right I don't know what I'm doing and I am rather learning by accident. I am not a programmer and don't profess to be one(yet). I have built the apps in the excellent book, Practical Django Projects and I have also worked through, The Definitive Guide

Re: local variable 'qft' referenced before assignment

2011-01-23 Thread bruno desthuilliers
On 23 jan, 17:27, Trevor Stanley wrote: >    Karen > > Thanks for your reply.  The reason I was trying to filter the id with > count was that I had read somewhere that you have to pass sum at least > two arguments (but may be I mis-understood what I was reading!) The Python builtin sum() function

Re: local variable 'qft' referenced before assignment

2011-01-23 Thread Trevor Stanley
so it is not part of the ft.count() == 1conditional: it is going to be executed regardless of the ft.count() value. In the case where ft.count() is anything other than 1, that line of code is attempting to use the value of a variable that has not yet been set to anything. It can't complet

Re: local variable 'qft' referenced before assignment

2011-01-22 Thread Karen Tracey
t complete successfully because the compiler doesn't know what to return for the value of qft since it has not been set to anything. That is what the message "local variable 'qft' referenced before assignment' means. >if ft.count()>=2: >

local variable 'qft' referenced before assignment

2011-01-22 Thread TAS
django/contrib/admin/ options.py" in save_model 597. obj.save() File "/home/trevor/1stdjangoproject/mysite/../mysite/bt4/models.py" in save 146. self.fringe_total = self.fringe_value() File "/home/trevor/1stdjangoproject/mysite/../mysite/bt4/models.py" i