I need to modify the render_pdf so that it receives the data that is stored in a list, since currently it does not show me any information.
my code is this:
Views.py
class PDFprueba(View):
def get(self,request,*args,**kwargs):
datos =...
I have a Django application that shows a list of documents of different extensions, the name of the documents contain special characters such as accents, ñ, etc. When I show the list I put a link that points to the location of the document in th...
I'm trying to pass a context (variables, parameters) to an xml template that has the following structure:
<infoTributaria>
<ambiente>1</ambiente>
<tipoEmision>1</tipoEmision>
<razonSocia...
I need to send the list "search" by response, the problem is that I can not serialize it with the library "JSON" that brings django by default and send it by the URL to the Frontend, how can I serialize the list and send it as any object json to...
Good I am configuring the jinja2 to begin to create my templates but it gives me the following error by terminal and in the url.
ImportError: Module "ControlAssistance.jinja2" does not define a
"ini_jinja" attribute / class
Module...
I need to show data from the database to a pdf, until now it generates the pdf but with static data that I added to it
VIEWS.PY
class PDFprueba(View):
def get(self,request,*args,**kwargs):
datos = {
'nombre' : 'jose...
Greetings I am trying to update the user of django from an html form but he does not accept the update. This is my form:
<form action="{% url 'seguridad:actualizar_usuario' %}" method="POST" autocomplete="off">
<input ty...
I just uploaded a test project in django to pythonanywhere, in which I was testing and I realized that I did not load the statical files of the admin.
I have made the corresponding configurations and apply the command python manage.py collectsta...
I have the following model in Django:
class Employee(models.Model):
code = models.CharField(max_length=10, verbose_name='Codigo Empleado', default='N/A')
name = models.CharField(max_length=50, verbose_name='Nombre')
firstname = models.CharFiel...
my question is to know if you can and how it would be to modify the QuerySet by default that a field with the ManyToMany model brings, because as I understand the default query is:
Modelo.objects.all()
But I would like to change that query...