from django.core.files.base import ContentFile
pdf_contents = get_pdf_contents()
file_to_be_saved = ContentFile(pdf_contents)
item = Item.objects.get(pk=1)
Django - Creating & Store PDF Files using XHTML2PDF