Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

A list is only as strong as its weakest link. -- Don Knuth


devel / comp.lang.python / always return the same pdf

SubjectAuthor
o always return the same pdfGonzalo V

1
always return the same pdf

<mailman.233.1646662152.2329.python-list@python.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=17423&group=comp.lang.python#17423

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!not-for-mail
From: gvm2...@gmail.com (Gonzalo V)
Newsgroups: comp.lang.python
Subject: always return the same pdf
Date: Mon, 7 Mar 2022 11:08:59 -0300
Lines: 27
Message-ID: <mailman.233.1646662152.2329.python-list@python.org>
References: <CAF40P_2izcWE6bEMr7F_KUFJV7XxpG+otfqmo67JKCJfCchvvg@mail.gmail.com>
Mime-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
X-Trace: news.uni-berlin.de nv+KG7uKQtrFqdT4TMuDiAjICOzorgBXPgUW1N8hNjRA==
Return-Path: <gvm2121@gmail.com>
X-Original-To: python-list@python.org
Delivered-To: python-list@mail.python.org
Authentication-Results: mail.python.org; dkim=pass
reason="2048-bit key; unprotected key"
header.d=gmail.com header.i=@gmail.com header.b=jqcYvFuw;
dkim-adsp=pass; dkim-atps=neutral
X-Spam-Status: OK 0.037
X-Spam-Evidence: '*H*': 0.93; '*S*': 0.01; 'skip:@ 10': 0.03; 'def':
0.04; 'django': 0.07; 'string': 0.07; 'everyone.': 0.09; 'ubuntu':
0.09; '18.04': 0.16; 'cosas': 0.16; 'latex': 0.16; 'pdf.': 0.16;
'received:209.85.218': 0.16; 'subject:always': 0.16;
'subject:pdf': 0.16; 'to:addr:python-list': 0.20; 'idea': 0.24;
'everyone': 0.32; 'message-id:@mail.gmail.com': 0.32; 'server':
0.33; 'same': 0.34; 'received:google.com': 0.34;
'from:addr:gmail.com': 0.35; 'pdf': 0.36; 'received:209.85': 0.37;
'could': 0.38; 'thanks': 0.38; 'received:209': 0.39; 'view': 0.60;
'gives': 0.62; 'skip:o 20': 0.63; 'con': 0.64; 'skip:o 40': 0.64;
'url:name': 0.64; 'skip:e 20': 0.67; 'url-ip:lookup error': 0.70;
'skip:f 20': 0.75; 'que': 0.84; 'bien': 0.91; 'sin': 0.91; 'skip:a
60': 0.91
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
h=mime-version:from:date:message-id:subject:to;
bh=LF/gbg0xvAHyX9QN82q2JOn/xuvmhoH9kSGNSwCZosQ=;
b=jqcYvFuw5H0oSY0EfPDDR78gY+MIZrxcEdhXLWCTq41NYMaXjQTCfSKYHU5rpkWdb9
QSi3u2b8cMLnBGo9gqYE3fgFSWp3C9NdKz5rQj6wFwWEMOFVxyIH5zs3D4z0aHYyTd+K
uyQfDlUotR8IPq0ny3gLxpYcScS3j2YCC2A5+7/pp4z+YnpDrNtIpoM2RY42UdNsCMvo
2q+C0N8QUaEA+YHUTh9M1OaZbzLpsA+3WhYtFLbul+2Dx2YI915k7YyGUlrKMb/R/Ua8
eStvZPlVFDITv4tBcpiqkFNO76+0EBJPrlIv9qAWfJS0DEZqvu57UYvoAOe6zH/xoaCI
hj6A==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20210112;
h=x-gm-message-state:mime-version:from:date:message-id:subject:to;
bh=LF/gbg0xvAHyX9QN82q2JOn/xuvmhoH9kSGNSwCZosQ=;
b=r/UACJEDS8lVWZ/35HnxZQ6Bh8JVQodY0zMLNzqYQ7d5SnTguytw0RIHAODKOyNUpU
l4Ai7WRPdCWOGf4j6sgKEYAJgXS36nCbqHux/lEHHgmocxWQZWjN7Rag7IzIr3AG2bK7
PxOs2El1Yi1LjnQdUZc6ChUhS/Te+VG+cECkUVGcw9hRydXtKjjYbr5dkOxxRkA7deeL
whxygM1IsHnnjTa8o9gGHtg9TwvYjLCIpGrrByT9S3nOsj8Xrv//thmyfr32ykBPiUJG
sBgSF+2m1WQJ2dEaiifCfTBZrald1NT9W7jqZUMIoSWHN99uKhePSXPNe9jmPJGefGPO
qcaQ==
X-Gm-Message-State: AOAM5320G5hhk8ClU/mIw3ltJte25c7zOR92nLD/mByxk/DMNvlJ9JuD
XTfasxwY14YIxf13pbHA6z5syRDBHuFxqCT0ZvNQTVYRu9Q=
X-Google-Smtp-Source: ABdhPJyL006uyh5f7icMjb7HjO2Xf8tn4pTj3usi3jEHUeQEY3eXzE4U+XCE8dLySvxKs/HbUg2/Vft2JhefSt08qIs=
X-Received: by 2002:a17:906:2695:b0:6cf:e1b4:118b with SMTP id
t21-20020a170906269500b006cfe1b4118bmr9005059ejc.348.1646662150258; Mon, 07
Mar 2022 06:09:10 -0800 (PST)
X-Content-Filtered-By: Mailman/MimeDel 2.1.39
X-BeenThere: python-list@python.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: General discussion list for the Python programming language
<python-list.python.org>
List-Unsubscribe: <https://mail.python.org/mailman/options/python-list>,
<mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive: <https://mail.python.org/pipermail/python-list/>
List-Post: <mailto:python-list@python.org>
List-Help: <mailto:python-list-request@python.org?subject=help>
List-Subscribe: <https://mail.python.org/mailman/listinfo/python-list>,
<mailto:python-list-request@python.org?subject=subscribe>
X-Mailman-Original-Message-ID: <CAF40P_2izcWE6bEMr7F_KUFJV7XxpG+otfqmo67JKCJfCchvvg@mail.gmail.com>
 by: Gonzalo V - Mon, 7 Mar 2022 14:08 UTC

Hello everyone.
i had upload a Django app to an ubuntu 18.04 server and it gives me the
same pdf everytime the view is called. To generate the pdf it receipts
differents string buy it gives me the same pdf. Could you give some idea
what is happening?

thanks everyone
@never_cached
def generar_pdf(request):
prueba = request.session.get('contenedor')
cantidad_preguntas=prueba['cantidad_preguntas']
archivo_salida = open("prueba.tex","w")

archivo_salida.write("\\documentclass[10pt,oneside,letterpaper]{article}")
archivo_salida.write("\\usepackage[utf8x]{inputenc}")

##hace mas y mas cosas sin importancia con latex que funcionan bien

archivo_a_descargar = open("prueba.pdf","rb") #
respuesta =
HttpResponse(archivo_a_descargar,content_type='application/pdf')
respuesta['Content-Disposition'] = 'attachment; filename="{0}"'.format(
archivo_a_descargar.name)

return respuesta
Saludos,
Gonzalo

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor