Questions tagged as 'django'

1
answer

The form.is_valid () function does not work in Django

I hope you can help me in advance thank you very much, it turns out that I have a form that I need to fill with information from my database before sending it to the template, but it turns out that when I want to evaluate it using the POST metho...
asked by 21.07.2017 / 22:36
1
answer

Restrict access by url

In my application I have the user model that extends AbstractUser and I have added two boolean fields, my question is, how can I make the user not enter certain views by url depending on whether it is validator or is a digitizer? So far I have o...
asked by 25.07.2017 / 02:28
1
answer

'unicode' object has no attribute 'lookup'

I'm trying to add a set of values belonging to id_jovenclub def detalle_jc(request, id_jovenclub ): jc = jovenclub.objects.get(pk=id_jovenclub) datos=ingresos.objects.all() print jc.ingresos_set.all() **ing = ingresos....
asked by 21.04.2017 / 17:41
1
answer

Generate elements dynamically in a template in Django

{%for i in cont%} <p>{{"module"+i}}</p> {%endfor%} I have this code in my template, and what I want is that it takes for each iteration of the for, a value of a dictionary that comes from the views.py whose keys are module1...
asked by 20.04.2017 / 10:50
2
answers

How to export to PDF in Django?

I'm using Django 1.8 and I want to export an HTML document to PDF, for this I use wkhtmltopdf, in addition to other libraries I had to import the following and the file view.py was like this: from django.views.generic import DetailView from wk...
asked by 04.05.2017 / 21:03
1
answer

Django - Send id to another template?

Template Detail of the tournament with its teams, when adding equipment, send the template to create a team, such as sending the tournament id and linking the team directly, without the need for a selection. models.py class Equi...
asked by 11.04.2017 / 21:47
1
answer

Join between two tables with django

I am trying to make a join between two tables in my database. I have my model called parameter and my model called validity, the latter has an attribute that is a foreign parameter key. I need to list all the parameters and for each of them the...
asked by 15.04.2017 / 15:23
1
answer

Make objects in a DJango view do not leave the screen

You see, I have the following html code (I have removed part of the code so you do not get lost): {% load staticfiles %} <html> <body> <h1>Lista de animales</h1> <table> {% for alfa in animales %} <td> <i...
asked by 09.05.2017 / 22:45
1
answer

how to export to pdf a table that is the result of a form in django

Hi, I'm doing an application in Django 1.8 and one of the things I want is for the user to fill out a form with certain search data, and I process all the data by consulting my model.object.filter and the I return the result of that query in an...
asked by 09.05.2017 / 22:30
3
answers

How to generate a POST response, with Django REST Framework Bulk?

I would like to know what is the way for the Response of a POST with rest_framework_bulk, to be modifiable since by default it always returns the same object or array of object that is sent to it by the service. model: class employee():...
asked by 20.03.2017 / 21:49