Re: View for getting field based on value from another field

2012-10-20 Thread Tomas Jacobsen
Thank you! kl. 20:48:27 UTC+2 torsdag 18. oktober 2012 skrev Dennis Lee Bieber følgende: > > On Thu, 18 Oct 2012 03:03:17 -0700 (PDT), Tomas Jacobsen > > declaimed the following in > gmane.comp.python.django.user: > > > Hello! > > > > I have a account model, which can store up to six max_val

Re: View for getting field based on value from another field

2012-10-18 Thread Bill Freeman
This may or may not be the cause, but spelling the variable in your loop exactly the same as the name of your model class feels hazzardous. Common practice would be to at least lowercase the name to use it as a variable referring to an instance. Bill On Thu, Oct 18, 2012 at 6:03 AM, Tomas Jacobs

View for getting field based on value from another field

2012-10-18 Thread Tomas Jacobsen
Hello! I have a account model, which can store up to six max_values . Those max_values ranges from 0 to 500 000. Each max_value field has a correlating percentage_value field. Im trying to write a view that finds what max_value field has a value from 0 to 5, and what number field it has, s