|
|
|
@ -2,6 +2,7 @@ import arrow |
|
|
|
|
|
|
|
|
|
|
|
from io import BytesIO |
|
|
|
from io import BytesIO |
|
|
|
from PIL import Image |
|
|
|
from PIL import Image |
|
|
|
|
|
|
|
from uuid import uuid4 |
|
|
|
from os.path import splitext |
|
|
|
from os.path import splitext |
|
|
|
from datetime import timedelta |
|
|
|
from datetime import timedelta |
|
|
|
from paymentwall import Pingback |
|
|
|
from paymentwall import Pingback |
|
|
|
@ -224,6 +225,7 @@ class UserEditView(UpdateView): |
|
|
|
if ext == 'JPG': |
|
|
|
if ext == 'JPG': |
|
|
|
ext = 'JPEG' |
|
|
|
ext = 'JPEG' |
|
|
|
photo.save(buffer, ext) |
|
|
|
photo.save(buffer, ext) |
|
|
|
|
|
|
|
fname = str(uuid4()) + '.' + ext.lower() |
|
|
|
self.object.photo.save(fname, buffer) |
|
|
|
self.object.photo.save(fname, buffer) |
|
|
|
buffer.close() |
|
|
|
buffer.close() |
|
|
|
if not request.POST._mutable: |
|
|
|
if not request.POST._mutable: |
|
|
|
|