mirror of
https://github.com/fergalmoran/dss.api.git
synced 2025-12-28 12:18:52 +00:00
Fixed urllib
This commit is contained in:
@@ -14,7 +14,7 @@ from spa.models.userprofile import UserProfile
|
||||
def save_image(profile, url):
|
||||
|
||||
img = NamedTemporaryFile(delete=True)
|
||||
img.write(urllib.urlopen(url).read())
|
||||
img.write(urllib.request.urlopen(url).read())
|
||||
|
||||
img.flush()
|
||||
profile.avatar_image.save(str(profile.id), File(img))
|
||||
|
||||
Reference in New Issue
Block a user