Django’s new Extract*() classes
Django 1.10 and even more 1.11 comes with convenient methods for annotating date parts to your query.
Django comes with these methods in terms of date manipulating
and with these in terms of time
Then you can go like:
from django.db.models.functions import ExtractWeek
Here is link to docs.