Override Method on DB get / filter / all

2011-02-13 Thread BW
I know you can override the save() method in a model, but is it possible to do it when you try to get a row or rows from a db? I have data like this '\xFF\x00\x00\x00\xFE'... that I need to store in a MySQL db. When I was trying to save it I was getting an error. Now I override the __save__ met

again a group by problem...

2010-01-13 Thread Bw.
Hi guys, I'm trying to realize a simple sql query in django for hours and I don't get it. Description: We have 'salesman' and 'disposals'. 1 salesman has N disposals. Now I need the average discount every salesman has given. In mysql this query gives me the correct recordset: SELECT salesman.fir