l.s.f.BaseImageUpload(Bytes) : class documentation

Part of lp.services.fields View In Hierarchy

Known subclasses: lp.services.fields.IconImageUpload, lp.services.fields.LogoImageUpload, lp.services.fields.MugshotImageUpload, lp.services.fields.tests.test_fields.TestBaseImageUpload.ExampleImageUpload

Base class for ImageUpload fields.

Any subclass of this one must be used in conjunction with
ImageUploadWidget and must define the following attributes:
- dimensions: the exact dimensions of the image; a tuple of the
  form (width, height).
- max_size: the maximum size of the image, in bytes.
Method __init__ Undocumented
Method getCurrentImage Undocumented
Method set Undocumented
Method _valid_image Check that the given image is under the given constraints.
Method _validate Undocumented
def __init__(self, default_image_resource=None, **kw):
Undocumented
def getCurrentImage(self):
Undocumented
def _valid_image(self, image):
Check that the given image is under the given constraints.
def _validate(self, value):
Undocumented
def set(self, object, value):
Undocumented
API Documentation for Launchpad, generated by pydoctor at 2022-06-16 00:00:12.