JOINING MANY TABLES

2023-02-01 Thread Abdou KARAMBIZI
Hello all, If I have a house with different floors , a floor has different rooms and rooms have people each room can have one person or may using it and pay rent I want to display in one html table : John is in room1 of floor3 and paid 1000 class Room(models.Model): room_id = mod

Re: Calculations

2023-07-10 Thread Abdou KARAMBIZI
e: > > ``` > from django.db.models import Sum > > # Where loan = the LoanInformation instance you're interested in > outstanding_balance = loan.amount_to_pay - > loan.payments_set.aggregate(Sum("amount")) > ``` > > > On Thursday, July 6, 2023 at 5:39:50 PM UTC

Re: Calculations

2023-07-10 Thread Abdou KARAMBIZI
['paid'] > > On Monday, July 10, 2023 at 11:03:06 AM UTC+1 Abdou KARAMBIZI wrote: > >> Hello Thomas >> >> I have tried but I got that error message >> >> On Fri, Jul 7, 2023 at 5:03 PM Thomas Couch wrote: >> >>> Hi Abdou, have a

APP DEPLOYMENT

2023-07-20 Thread Abdou KARAMBIZI
Hello friends, I want to know where I can upload my django projects for the reason of showing them as my technical experience. -- 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, se

DAILY,MONTHLY AND ANNUAL REPORTS

2023-07-21 Thread Abdou KARAMBIZI
Hello Friends, How can I get weekly,Monthly and annual reports? from the following model. I want to get the total amount paid in the week,month and year class Payments(models.Model): id = models.AutoField(primary_key = True) amount = models.IntegerField() paidon = models.DateField(au

JOIN

2023-10-25 Thread Abdou KARAMBIZI
Hello group members, How can I get result containing any information from both 3 models eg. Customer|contact | room number|room price| business| - --- John Doe |+1 989898989|12 | 1000|res

Displaying contrast of a queryset

2024-04-26 Thread Abdou KARAMBIZI
Hello, *I have 2 models :* class Product(models.Model): product_id = models.AutoField(primary_key=True) product_name = models.CharField(max_length=200) price = models.IntegerField() image = models.ImageField(upload_to='images/products_images/',null=True,blank=True) def __str_

Re: Displaying contrast of a queryset

2024-04-27 Thread Abdou KARAMBIZI
anana Bread are just products I have added as dummy data. > > Hopes this help or atleast gives a guide somehow > > On Friday, April 26, 2024 at 5:22:26 PM UTC+3 Muhammad Juwaini Abdul > Rahman wrote: > >> You're looking for `product`, but the model that you

Re: Displaying contrast of a queryset

2024-05-03 Thread Abdou KARAMBIZI
M CDT, manohar chundru < >> chundrumanoh...@gmail.com> wrote: >> >>> print(p) >>> >>> On Sun, Apr 28, 2024 at 12:25 AM Abdou KARAMBIZI >>> wrote: >>> >>>> Hello friends, >>>> >>>> products = Task.objects.sel

Re: Displaying contrast of a queryset

2024-05-19 Thread Abdou KARAMBIZI
y(Product, on_delete=models.CASCADE, null=True, blank=True) tasks = Task.objects.filter(product__isnull=True) On Fri, May 3, 2024 at 9:52 AM Abdou KARAMBIZI wrote: > > ThanksKelvin Macharia > > Now it is working properly > > On Wed, May 1, 2024 at 9:24 PM Kelvin Macharia > wrote: