Django datetime

Hello

I want to have a list whose date is between today’s datetime and 15 days future from today’s date.

I have a datetime format like this: 2023-07-23 13:30:00+03

# Get the current datetime
current_datetime = datetime.now()

# Add 15 days to the current datetime
fifteen_days_ahead = current_datetime + timedelta(days=15)
daterendezvous_list = models.DateRendezVous.objects.filter(date_rendezvous_gte=[current_datetime, fifteen_days_ahead])

when I run my code I have an error following
fromisoformat: argument must be str

Can give an example like this ?

You’re trying to supply a list of two values to a query field lookup function that only takes one value (gte). I think what you are looking for is range.

Also note that the lookup function is separated from the field name by two underscores, not one.