def _check_max_source_dimensions_attribute(self, **kwargs): if not is_size(self.max_source_dimensions): return [ checks.Error( 'max_source_dimensions should be a tuple of 2 non-negative numbers', obj=self ) ] else: return []
def _check_admin_item_size(cls, **kwargs): if not cls.ADMIN_ITEM_SIZE: return [ checks.Error( 'ADMIN_ITEM_SIZE is required', obj=cls ) ] elif not is_size(cls.ADMIN_ITEM_SIZE): return [ checks.Error( 'ADMIN_ITEM_SIZE should be a tuple of 2 non-negative numbers', obj=cls ) ] else: return []
def _check_max_source_dimensions(cls, **kwargs): if not cls.MAX_SOURCE_DIMENSIONS: return [ checks.Error( 'MAX_SOURCE_DIMENSIONS is required', obj=cls ) ] elif not is_size(cls.MAX_SOURCE_DIMENSIONS): return [ checks.Error( 'MAX_SOURCE_DIMENSIONS must be a tuple of 2 non-negative numbers', obj=cls ) ] else: return []