Hi,

I am trying to work around with PDF's where user uploads PDF in image or
filefield and then way to extract it for Django and finally update DB table
based on it. Following are the models:

class StudentFee(models.Model):
       class_name = models.CharField(choices=CLASSES, max_lenght=200)
       fee_deposit_slip = models.ImageField(upload_to="students/")

       def __unicode__(self):
             return unicode(self.class_name)

All I need is to design a view where I can extract data from the PDF
uploaded in the model below:

class StudentInfo(models.Model):
        first_name = models.CharField(max_length=200)
        last_name = models.CharField(max_length=200)
        email=models.EmailField()
        phone = PhoneField() #using phoneField custom field
        def __unicode__(self):
               return unicode(self.first_name)

All the fields in second model does exist in the PDF. In my Views.py

class StudentPDFReader(FormView):
      template_name = 'pdfdata.html'
      form_class = PDFForm
      success_url = '/success/'

      def form_valid(self, form):
           # here I need to extract and add entries to modelform
          return super(StudentPDFReader, self).form_valid(form)

Looking for kind help.

Regards,
Shazia

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAD83tOyHABrpfn48EwMgjbvCB5y1U4AwwL_%2BS1EnCb6WebyWKw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to