python - AttributeError: 'StdImageFieldFile' object has no attribute 'thumbnail' -


i have model field logo defined stdimagefieldfile , variations thumbnail set this

logo = stdimagefield( upload_to='logos/', null=true, blank=true, variations={ 'thumbnail': ( settings.logo_width, settings.logo_height, true) }) when try value of logo thumbnail (model.logo.thumbnail) in asynchronous task celery, getting error following error attributeerror: 'stdimagefieldfile' object has no attribute 'thumbnail'

but works fine without celery task, in django shell.

i debugged attributes of logo field inside celery task, there isn't attribute thumbnail

{'_committed': true, 'name': logos/logo-ferrari_s0khoe7.png','instance': instance, 'storage'<django.core.files.storage.defaultstorage object @ 0x10c1cb3d0>, '_file': none, 'field': <stdimage.models.stdimagefield: logo>, 'closed': false} 

but can see thumbnail attribute shell

{'_committed': true, '_file': none, 'field': <stdimage.models.stdimagefield: logo>, 'instance': instance, 'name': logos/logo-ferrari_s0khoe7.png','storage':<django.core.files.storage.filesystemstorage @ 0x1103b8610> 'thumbnail':<imagefieldfile: logos/logoferrari_s0khoe7.thumbnail.png>} 

any idea missing here ?


Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

ios - Change Storyboard View using Seague -