[Fixed]-Python Django – Uploading a file from the shell 12 December 2023 by thecoderscamp.com 1👍 try: f = open('some.pdf', 'r') a.attachment = File(f) a.save() f.close() 👤alfonso.kim How do use Foreign Key in slug django Source:stackexchange.com