Questions tagged as 'django'

2
answers

Filter queryset by group

I have a model called ColaNotificaciones. class ColaNotificaciones(models.Model): class Meta: unique_together = (('remitente', 'destinatario', 'asunto','producto'),) remitente = models.CharField(max_length=20) destinatario...
asked by 12.02.2018 / 10:50
1
answer

How do I insert a ForeignKey field into a model?

I do not know what I'm doing wrong look at my model.py I'm using a User extending AbstractBaseUser since I wanted to use the email field as an identifier and not the username that comes with the default in fact delete it. Using the admin works p...
asked by 29.01.2018 / 15:01
1
answer

Redirect Django with paramentros

I'm running a payment gateway in Django and I'm trying to split the procedure into two views, one makes the call and gets the answer and the second processes the response. Right now my code is something like this: def comprar(self): ......
asked by 02.04.2018 / 14:34
1
answer

page not found django 2.0.2 python 3.5

I request of your wisdom and wisdom to determine the reason that you receive the famous 404 error when I try to load my web pilot in Django, the difference that I have in relation to this same topic already explained several times is that I in t...
asked by 20.02.2018 / 05:24
1
answer

Help error when uploading my project django a heroku

Hello everyone I have searched a thousand tutorials, read the official documentation, but I have found many errors, and this is the last one that has thrown me just when it is uploading my application. Collecting setuptools Using cached setu...
asked by 19.01.2018 / 21:57
1
answer

How to save the fk of a model in django?

I have a model called a device, this creates the folio and the name and additional I want to store the id of the user that is logged. This is my class: class RegistroDispositivo(CreateView): model = Device template_name = 'registroDisp...
asked by 02.02.2018 / 23:46
2
answers

Problem with a Choice [Django - Pyhon]

Good morning! I have a modeo which has a field of type text in which is a "choice". ANUNCIADA = 'A' AMARRADA = 'M' TERMINADA = 'T' ANULADA = 'N' LIST_ESTADOS_ANUNCIOS = ( (ANUNCIADA, 'Anunciada'), (AMARRADA, 'Amarrada'), (TERMINADA, 'Termi...
asked by 02.02.2018 / 18:52
1
answer

how to limit the sending of emails in django

Good morning: On the website that I am developing, send an email to the owner of the product every time another user puts it in favorite and I have found that if you start clicking many times it will not stop sending emails to that person wit...
asked by 27.12.2017 / 16:16
1
answer

how to assign the value of a variable django to a variable in angularjs

Greetings, I have the following problem with my django application, I use swwetAlert to show messages in my web interface, but I want the message that is generated in my view to be displayed in my template, for this I need to store in a javascri...
asked by 09.01.2018 / 19:46
1
answer

Filter results Serializer Django

Good, I have a problem because I want to filter the data of an FK in a serializer. class ProductoArmarioSerializer(serializers.ModelSerializer): imagenes = FotoSerializer(many=True) tallas = StockSerializer(many=True) class Meta:...
asked by 28.12.2017 / 08:27