Re: Calculations

2023-07-10 Thread Abdou KARAMBIZI
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 look at aggregation ( > https://docs.djangoproject.com/en/4.2/topics/db/aggregation/) > > In this case I think you'll want something like: > > ``` > from django.db.models

Re: Calculations

2023-07-10 Thread Thomas Couch
Ah ok, looks like aggregate always returns a dictionary. This should work: outstanding_balance = loan.amount_to_pay - loan.payments_set.aggregate(paid=Sum("amount"))['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 erro

Re: Calculations

2023-07-10 Thread Abdou KARAMBIZI
Thanks Thomas, now it is working properly On Mon, Jul 10, 2023 at 12:17 PM Thomas Couch wrote: > Ah ok, looks like aggregate always returns a dictionary. This should work: > > outstanding_balance = loan.amount_to_pay - > loan.payments_set.aggregate(paid=Sum("amount"))['paid'] > > On Monday, July

Running migrations with multiple databases

2023-07-10 Thread Shaheed Haque
Hi, I'm on Django 4.2 atop Postgres. In my project settings.py, I have a main/default database connection, and a second set up like this: == DATABASES = { 'default': { ... 'NAME': 'foo', # Postgres DATABASE NAME ... }, 'archive_r

Re: Digest for django-users@googlegroups.com - 12 updates in 6 topics

2023-07-10 Thread johnc711
awaymail I'm currently Away Thanks for your email. I am away from my email until 2023-07-10 23:59:59. If you need a response before then. click below for your message to reach me immediately. Send email →

Re: iNTRODUCTION

2023-07-10 Thread ANOOP S PILLAI
welcome to the community, I am also in my beginning curve. Hope to learn and be industry ready with all of you. On Sun, Jul 9, 2023 at 8:24 PM Emmanuel Kasirivu Lugoloobi < ema.kasir...@gmail.com> wrote: > Hello guys im studying network systems engineering in college and > intrested in becoming a

Re: Running migrations with multiple databases

2023-07-10 Thread David Nugent
Migrations are executed according to how your db routers is setup. See setting DATABASE_ROUTERS. Note that normally you would be replicating secondaries, so migrations are normally not applied on all bu the primary, so this is the default. Regards, David On Mon, Jul 10, 2023 at 10:26 PM Shaheed

Emali Response From the Django server.

2023-07-10 Thread Prateek Lodhi
Hi, I am trying to send a mail to the end user after the user successfully password reset to the webapp, and I have completed the module for it, and it's working fine in the local server but when I upload the application into the server and try to run that functionality. It shows [image: image