Closed thelittlebug closed 5 years ago
Thank you for reporting the problem.
It would be good if you provided the traceback of the error in order to see where it was raised.
Nevertheless from what I know FilerImageField
is actually foreign key to a model instead of a real ImageField
which means that picture
attribute will be Model instance instead of something extending ImageFile
or at least File
. The actual file from django-filer in your case is picture.file
.
In order to fix this probably you should need to make a getter property in your model. For example something like:
@property
def picture_file(self):
return picture.file
Or something similar and then use source='picture_file'
.
This is untested it just came in my mind but you can try it.
thank you for your valuable input on this problem.
i was unable to debug it on my own because i had no real debugging possibility till now (it's not so easy to debug django and all possible external and internal python modules as a django newcomer without a good configured dev-environment. maybe i should write a little "howto: debug django and other little monsters, the comfortably way" ).
i'll try your idea in the next few days.
many thx
thank you, works as expected :)
@property
def picture_file(self):
return self.picture.file
Hello,
I am trying to add a thumbnail to the django admin list display as described in the docs.
My installed packages:
My model and the admin config:
on my own im not able to figure out why it throws this error. any help would be of great value.
thx :)