def bg_image(value, message='Invalid background image path'):
  if not value:
    return value
  if not BG_IMAGE_COMPILED.match(value):
    raise exception.ValidationError(message)
  return value
Get object from generic date_based.detail view
dataset/ETHPy150Open CollabQ/CollabQ/common/clean.py/bg_image--crossover with--dataset/ETHPy150Open lambdalisue/django-permission/src/permission/decorators/functionbase.py/get_object_from_date_based_view