1
dateutil.rrule
is library you could leverage. To get the next weekday:
from dateutil import rrule
next_weekday = rrule.rrule(rrule.DAILY, count=3, byweekday=(0, 1, 2, 3, 4), dtstart=dt))
So, in your query, you could do something like this:
def compute_shipping(dt=datetime.datetime.date(), count=2):
next_weekdays = rrule.rrule(rrule.DAILY, count=count, byweekday=(0, 1, 2, 3, 4), dtstart=dt))
return list(next_weekdays)
#Ready to ship
Report.objects.filter(ddate__in=compute_shipping()).update(pull_ins="Ready to ship")
#For Not yet
#Query would be similar - just set the appropriate start date
Source:stackexchange.com