Re: local variable 'qft' referenced before assignment

2011-01-24 Thread Trevor Stanley
inent issues. Best - Trevor Rainy wrote: 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,

Re: local variable 'qft' referenced before assignment

2011-01-24 Thread Trevor Stanley
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 Proj

Re: local variable 'qft' referenced before assignment

2011-01-23 Thread Trevor Stanley
ut it. Trevor bruno desthuilliers wrote: 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 readi

Re: local variable 'qft' referenced before assignment

2011-01-23 Thread Trevor Stanley
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!) I have changed my code to: def get_fringe_value(self): ft = Fringe.o

Re: Can someone help with Many-to-many referencing and then calculations against another field on the linked model

2011-01-21 Thread Trevor Stanley
r/lib/python2.5/site-packages/django/db/models/fields/__init__.py" in get_db_prep_save 775. return connection.ops.value_to_db_decimal(self.to_python(value), File "/usr/lib/python2.5/site-packages/django/db/models/fields/__init__.py" in to_python 750. return d

Re: Can someone help with Many-to-many referencing and then calculations against another field on the linked model

2011-01-21 Thread Trevor Stanley
when writng code. I have worked through some Python tutorials online but still struggle to test my code via the shell! All this leads me to going around in ever decreasing circles - I hope you can help me out of the fog. -TS Rainy wrote: On Jan 20, 2:04 pm, Trevor Stanley wrote:

Re: Can someone help with Many-to-many referencing and then calculations against another field on the linked model

2011-01-20 Thread Trevor Stanley
time so have just arrived home from work. Many thanks for looking at this for me. Kenneth Gonsalves wrote: On Thu, 2011-01-20 at 08:37 +, Trevor Stanley wrote: Fringe.objects.select_related().filter(id=self) should this not be (id=self.id) -- You received this message beca

Re: Can someone help with Many-to-many referencing and then calculations against another field on the linked model

2011-01-20 Thread Trevor Stanley
Kenneth Gonsalves wrote: On Wed, 2011-01-19 at 22:34 +, The Stanley Household wrote: Happy to send Model if needed but at the moment I'm unable to run the server to provide admin error report, can C&P from terminal if that would help with the error. please copy and paste your code