Django - calling full_clean() inside of clean() equivalent?

Posted by orokusaki on Stack Overflow See other posts from Stack Overflow or by orokusaki
Published on 2010-03-12T16:53:49Z Indexed on 2010/03/12 16:57 UTC
Read the original article Hit count: 316

For transaction purposes, I need all field validations to run before clean() is done. Is this possible? My thinking is this:

    @transaction.commit_on_success
    def clean(self):
        # Some fun stuff here.
        self.full_clean()  # I know this isn't correct, but it illustrates my point.

but obviously that's not correct, because it would be recursive. Is there a way to make sure that everything that full_clean() does is done inside clean()?

© Stack Overflow or respective owner

Related posts about django

Related posts about django-models