Re: queryset in clean method

2010-04-06 Thread Vinicius Mendes
You can pass the competition instance to the for in the initialization. In the form you change the form a little bit adding the init method to receive the competition parameter. Then you can save it in a form attribute and then use it in clean method. I made a simple gist to show you haw it could

queryset in clean method

2010-04-06 Thread When ideas fail
hello, i have a clean method in my forms.py. I want this to check a person is old enough to enter a competiton The problem i have is that the minimum age changes and is a field in the competition model(it is entered by the user). My clean method is like this (pseudo code): class personform(forms