@contextlib.contextmanager
def reraise_django_validation_errors():
 try:
  (yield)
 except DjangoValidationError as err:
  raise ValidationError(*err.args)

@ contextlib . contextmanager def reraise_django_validation_errors ( ) : try : ( yield ) except DjangoValidationError as err : raise ValidationError ( * err . args )
context manager to reraise djangovalidationerrors as osf .