with open('media_cdn/account/pdf01.pdf', 'wb') as out_file:
output.write(out_file)
Как я могу отформатировать это, чтобы иметь индивидуальное имя для каждого выхода? Например, я попытался:
author_id=str(instance.author.id)
with open('media_cdn/account/{author_id}-pdf01.pdf', 'wb') as out_file:
output.write(out_file)
однако файл выводится как "{author_id}-pdf01.pdf"