i want insert qr in file pdf (filefield ) help me.!!!

i want insert qr in file pdf (filefield select database ) ->save database . help…
Model

class Fileupload_pdf(models.Model):

tite =models.CharField(default="",max_length="20",verbose_name="Title file ")

filepdf = models.FileField(default="",upload_to="data/",verbose_name="file PDF not QR")

active = models.BooleanField(default=False)

filepdf_qr = models.FileField(default="",upload_to="dataqr/",null=True,blank=True ,verbose_name="file PDF insert QR")

   

class Meta:

    verbose_name = "Upload PDF "

    verbose_name_plural = 'Uplpooad PDF'

def __int__(self):

    return self.tite

form.py

class Formaddfile(object):

class Meta:

    model = Fileupload_pdf

    fields = ['title','filepdf',]

def __init__(self, *args, **kwargs):

    super(Formaddfile, self).__init__(*args, **kwargs)

views.py

from django.db.models.fields import Field

from django.http.request import QueryDict

from django.http.response import Http404

from django.shortcuts import render, redirect

from django.views.generic import View

from django.views import View

from django.contrib import messages

from django.contrib.auth.mixins import LoginRequiredMixin

from reportlab.pdfgen import canvas

from django.http import HttpResponse

from reportlab.graphics.shapes import Drawing

from reportlab.graphics.barcode.qr import QrCodeWidget

from reportlab.graphics import renderPDF

import unidecode

import os

class Uploadformaddfilepdf(LoginRequiredMixin,View):

def get(self,request):

    form = Formaddfile()

    context = {

        'form':form,

    }

    return render(request,"formupload.html",context)

def post(self,request):

    if request.POST:

        form = Formaddfile(request.POST,request.FILES)

        if form.is_valid():

            form.save()

            return redirect("")

class VievPDF(View):

def get(self,request):

    filepdf = Fileupload_pdf.objects.all()

   

    context = {

        'filepdf':filepdf,

    }

    return render(request,"viewpdf.html",context)

class AddQrPdf(LoginRequiredMixin,View):

def get(self,request,id_filepdf):

    filepdf_data = Fileupload_pdf.objects.get(pk=id_filepdf)

   

    conten_QR ={

        'id':filepdf_data.id,

        'content': "OK"

    }

    help me!!!

    create image QR and   add qr filepdf

    filepdf = Fileupload_pdf.objects.all()

   

    context = {

        'filepdf':filepdf,

    }

    return render(request,"viewpdf.html",context)

template/formupload.html

{% csrf_token %}

{{form}}

template/viewpdf.html

{% for item in filepdf %}

{%endfor%}

title file file_QR action
{{item.title}} {{item.filepdf}} {{item.filepdf_qr}} add qr

Hello,

you need to provide more info about what you want to achieve and what you tried so far.

i want get file pdf in Fieldfile database .create QR and insert QR in PDF .

Creating the QR and inserting it into the PDF are not Django-related issues.

Once you have that code working, we can help you with adding the updated file back into your storage system.

Also note, there is no need for the “Help me!!!” in the subject lines. You’re here requesting assistance - we know that, otherwise you wouldn’t be posting a question.

Yes! I got it
but Does anyone have the answer? .