I have a model that contains
if model.date.isocalendar() == datetime.date.today().isocalendar()
date.isocalendar() Return a 3-tuple, (ISO year, ISO week number, ISO
today = datetime.date.today()
monday = today - datetime.timedelta(days=today.weekday())
You're not going to be able to do this. Remember it's not just an issue of what Python supports, Django has to communicate the filter to the database, and the database doesn't support such complex date calculations. You can use
__range, though, with a start date and end date.