[Fixed]-Retrieving thumbnailPhoto from Active Directory in Django/Python

1👍

I think it’s good idea to cache results in ImageField. You cad do it like this

from django.core.files.base import ContentFile
somemodel.image.save('{0}/photos/{1}.jpg'.format(settings.MEDIA_ROOT, username), ContentFile(your_byte_string))

Leave a comment