On Sat, 2012-03-31 at 09:25 +0530, Nikhil Verma wrote:
> How can i do this kind validation where fields are dependent on each
> other
https://docs.djangoproject.com/en/1.4/ref/contrib/admin/#adding-custom-validation-to-the-admin
docs are wonderful
--
regards
Kenneth Gonsalves
--
You received
On Sat, Mar 31, 2012 at 4:55 AM, Nikhil Verma wrote:
> Hi All
>
> How can i apply validation in admin on various fields when they are
> dependent on each other ?
>
There is good advice laid out in the docs for when you need to clean
and validate fields that depend on
Hi
I did not override response_change method but i override clean method by
creating form in admin like this :-
class InterviewAdminForm(forms.ModelForm):
class Meta:
model = Interview
def clean(self, *args, **kwargs):
cleaned_data = super(InterviewAdminForm,
ok. in admin,.py file
override the response_change method
def response_change(self,request,obj)
obj is the handler
so u can check using obj.field_name and take approp action
On Sat, Mar 31, 2012 at 10:34 AM, Nikhil Verma wrote:
> Hi
>
> I understand that but the
Hi
I understand that but the problem is its a condition which i have to add if
the revisit checkbox is selected and then in interview_type dropdown None
option is selected ; after pressing save it should throw an error .
None is an option in the dropdown . It is not blank=True and null =True
Hi
unless u dont specify blank=True or null = True in modes for d
corresponding fields, django will throw an errror if u don fill up the field
On Sat, Mar 31, 2012 at 9:25 AM, Nikhil Verma wrote:
> Hi All
>
> How can i apply validation in admin on various fields when
6 matches
Mail list logo