How can routes be protected when generating a pdf with wkhtmltopdf-django using a POST method?

0

I need to generate a pdf for which I use a class with a get method, I need to protect the address generated by this pdf, using a post method or something that allows me to hide the address or parameters that I pass. What can I do?

class PDF4(ListView):
    context_object_name = "data"
   # model = Clientes
    template_name = "index.html"

    def get(self, request):

        id_plan = self.request.GET.get('id_plan')


        data = self.calendarios(id_plan)

        response = PDFTemplateResponse(request=request,
                                       template=self.template_name,
                                       filename="hello.pdf",
                                       context=data,
                                       show_content_in_browser=True,
                                       cmd_options={'margin-top': 10,
                                                    'dpi': 72,
                                                    'zoom':1,
                                                    "orientation": 'Landscape',
                                                     "page-size":'Letter',
                                                    'javascript-delay': 1000,
                                                    'footer-center': '[page]/[topage]',
                                                    "no-stop-slow-scripts": True},
                                       )
    
asked by SAMUEL OJEDA 09.03.2018 в 18:01
source

0 answers