SHARE
TWEET

Untitled

a guest Jul 19th, 2019 64 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. from nitwit.website.models import *
  2. from sorl.thumbnail import get_thumbnail
  3. from sorl.thumbnail import delete
  4. x= MeetingRoom.objects.all()
  5. z= MeetingRoomImages.objects.all()
  6. for y in z:
  7.     im = get_thumbnail(y.picture, '150x210', crop='center', quality=99)
  8.     y.picture_thumb=im.url
  9.     y.save()
  10.  
  11. for y in z:
  12.     im = get_thumbnail(y.picture, '720', quality=99)
  13.     y.picture_medium=im.url
  14.     y.save()
  15.  
  16.  
  17. for y in x:
  18.     im = get_thumbnail(y.coverimage, '150x210', crop='center', quality=99)
  19.     y.coverimage_thumb=im.url
  20.     y.save()
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top