﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
18205	Admin validate() method suggests erroneous invocation?	Keryn Knight <django@…>	nobody	"
According to the docstring for validate() in django.contrib.admin.validation ([https://code.djangoproject.com/browser/django/trunk/django/contrib/admin/validation.py?rev=16725 currently]):
{{{
Calls custom validation classmethod in the end if it is provided in cls.
The signature of the custom validation classmethod should be: def validate(cls, model).
}}}
I take this to mean that a ModelAdmin subclass may provide a validate method of it's own, to ensure additional checks are run. However, doing something like:
{{{
class MyModelAdmin(admin.ModelAdmin):
[...]
    @classmethod
    def validate(cls, model):
        from pdb import set_trace; set_trace()
}}}
Never yields an interactive shell, nor can I see anywhere in the validation code where it might even be attempting to call it.

As it's undocumented, as far as I know (thus an internal API) this could be considered a case of:

* the docstring not being clear enough [at least, for me to understand]
* the docstring never being correct [because it has appeared that way since [https://code.djangoproject.com/browser/django/tags/releases/1.0/django/contrib/admin/validation.py 1.0]]
* the functionality having been removed at some point [perhaps wrongly]

Apologies if this is a dupe, but the search results were rather mired in form validation and the admin."	Bug	closed	contrib.admin	dev	Normal	invalid			Accepted	0	0	0	0	0	0
