I'm looking to building an Model where it's fields are populated by the contents of a PDF file.
class ContaPdf(models.Model):
conta_pdf = models.FileField(upload_to='conta_pdf')
class Conta(models.Model)
data_inicio = models.DateField()
data_fim = models.DateField()
data_vencimento = models.DateField()
telefone = models.ForeignKey(Telefone)
@receiver(pos_save, sender=ContaPdf)
def pdf_parser(sender, **kwards):
# Parses data from PDF file and create/save Conta object.
Is there any easier way to do this, considering I'll be using mostly django.admin as interface?
I can't quite see the alternatives.