I have a problem in calculating Sum. my models.py is as follows :- class Book(models.Model): book_text = models.CharField(max_length=200) price = models.IntegerField(default=0) tax = models.DecimalField(max_digits=10, decimal_places=2) class Author(models.Model): book = models.ForeignKey(Book) author_text = models.CharField(max_length=200) class Total(models.Model): total = models.IntegerField(default=0)
In this I wish to calculate total of price and tax,tax is applied on every book. e.g. Book 1 : Price = 450 , Tax =.05 Book 2 : Price= 500 , Tax =.04 Which function should be aplied and in which part of Application? Muskan Blog: http://muskana912.wordpress.com/ I am ready to bear short term pain for long term gain ! :) -- You received this message because you are subscribed to the Google Groups "Django developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-developers+unsubscr...@googlegroups.com. To post to this group, send email to django-developers@googlegroups.com. Visit this group at http://groups.google.com/group/django-developers. To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/CAEXi%2BQzFZfGL4V%3DFe0A9v47Ofmw_31uKYCaFnFGTuT5g4DcAfg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.