Questions tagged as 'django'

1
answer

convert render_pdf to get a list

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 =...
asked by 18.12.2018 / 23:32
0
answers

Problem with special characters in request get with django, nginx as reversed proxy & gunicorn

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...
asked by 19.12.2018 / 23:01
0
answers

Pass Context to XML Django

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...
asked by 19.12.2018 / 21:17
0
answers

Response without ModelSerializer in Django?

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...
asked by 21.12.2018 / 17:26
0
answers

Error with Jinja2

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...
asked by 17.12.2018 / 19:47
1
answer

Print model data to a pdf

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...
asked by 17.12.2018 / 23:29
0
answers

Update Model User

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...
asked by 06.12.2018 / 22:33
1
answer

Error deploy django 1.11 Admin without styles

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...
asked by 05.12.2018 / 03:24
0
answers

Filter initial values of related models

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...
asked by 04.12.2018 / 19:50
1
answer

How to modify the queryset of a ManyToMany field in Django Framework

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...
asked by 29.11.2018 / 23:21