def validates(model): try: model.validate(clean=True) except ValidationError: return False return True