Hi people, I'm new in django, so i have simple questions. Sorry for that.
I want to develop a simple app to make entries in stock. To start i install the jet dashboard and start an app called polls: https://ibin.co/3LmUv6rGJRXt.png I want to add a entrie and inside i need to have a table where i will insert the news produts to the entrie. I have this now, but i need that which new product have a column with the liquid weight (pesoliquido) that is an equation: class InputDetail(models.Model): input = models.ForeignKey(Entrada,on_delete=models.CASCADE) produto = models.CharField(max_length=200); weight = models.PositiveSmallIntegerField(); caixas = models.PositiveSmallIntegerField(); pesocaixas = models.PositiveSmallIntegerField(); pesopaletes = models.PositiveSmallIntegerField(); def _get_liquid(self): return self.weight - (self.caixas * self.pesocaixas) - self.pesopaletes pesoliquido = property(_get_liquid) white = 'white' green = 'green' tipopalete = ( (white,'Jaulas Brancas'), (green,'Jaulas Verdes'), ) palete = models.CharField( max_length=20, choices=tipopalete, default=white, ) the liquid weight should be the equation and if the user want an entrie to insert the value. The table of the products inserted should have the sum of all liquid weight. How can i do this? I want too a popup window to insert the products.. Thanks guys -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at https://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/f320e0e2-1c51-47e4-8675-43d1653daa6b%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.