Questions tagged as 'django'

1
answer

Select value by id

I have a question, in my view.py I have a question example ing =ingresos.objects.values('id').annotate(Sum('precio')) works fine but as you will see in the tamplete I "paint" all the values in the database, how could that query to only s...
asked by 02.05.2017 / 16:27
2
answers

Problem with ready in Javascript and Bootstrap

Good, it is in a development that includes a bootstrap menu and I wanted to leave marked which option is selected, for it I use a javascript. It was working correctly until I added some more menu option, and that's when I've seen that in some...
asked by 25.04.2017 / 13:54
1
answer

'ReverseManyToOneDescriptor' object has no attribute 'form'

Greetings, my question is this: I need to filter all users who are not registered in a certain form (whose id comes from the previous template with a kwarg), I pose the models: class UCAUser(AbstractUser): dni_cif=models.CharField(...
asked by 03.05.2017 / 10:16
1
answer

Calculate quarterly statistics django

I have to show different statistics in a project in django, so far it works well, when I calculate them, but I need to make quarterly cuts, how could I do it? I leave you the view.py def inicio(request): plan_gral = jovenclub.objects.aggre...
asked by 16.04.2017 / 19:49
1
answer

object has no attribute 'save' when I try to save form in django

Good afternoon friends I have a slight problem, and I do not see the solution, I'm trying to save a search value by rank of fronts in the database using a form, all right, but when I try to save it gives me this error : 'FiltroFechas' object h...
asked by 04.04.2017 / 22:00
0
answers

OsError [Errno 22] Invalid argument

I have a problem with a web application that I am currently developing. I was developing it on another computer but I decided to finish the development on a new computer and the application works normally until I try to register a news item in t...
asked by 10.05.2017 / 00:14
1
answer

After installing PostgreSQL I try to access the localhost and I get a message that the page does not exist

I am starting a web page project which I will do with Django , to make it more complete I will use PostgreSQL to manage the database. I already have installed the python with which I also have a good experience and I also have installed...
asked by 06.03.2017 / 19:00
0
answers

How to make a query Inner Join in Django

I have the following models: class perfil(models.Model): usuario = models.OneToOneField(User, on_delete=models.CASCADE) carrera = models.TextField() promocion = models.TextField() telefono = models.TextField(max_length=11)...
asked by 20.02.2017 / 21:13
2
answers

Datepicker bootstrap in Python (Django)

The basic implementation of the Bootstrap Datepicker works correctly, what does not work is the datesDisabled (deactivate dates): My forms.py: class BookForm(forms.ModelForm): class Meta: dateTimeOptions = { 'format': 'dd/mm/...
asked by 28.01.2017 / 21:23
1
answer

How to show an image of my model in the template?

That is the result of the template: {% for eventos in eventos %} <h2>{{ eventos.nombre }}</h2> <p>{{ eventos.imagen }}</p> <p><b>Descripción:</b> {{ eventos.descripcion }}</p> <...
asked by 31.01.2017 / 22:12