Updating string format synatx part 2

This commit is contained in:
Mouse Reeve
2021-09-18 11:32:00 -07:00
parent be86fbcf4d
commit acfb1bb376
36 changed files with 96 additions and 110 deletions

View File

@ -79,7 +79,7 @@ def save_user_form(form):
# set the name to a hash
extension = form.files["avatar"].name.split(".")[-1]
filename = "%s.%s" % (uuid4(), extension)
filename = f"{uuid4()}.{extension}"
user.avatar.save(filename, image, save=False)
user.save()
return user