current week

This commit is contained in:
j 2023-10-01 09:08:09 +02:00
commit e59c9d2f41
2 changed files with 11 additions and 7 deletions

View file

@ -77,7 +77,7 @@ def index(request):
def archive(request, year=None, month=None, day=None, week=None):
context = default_context(request)
_, archive = models.Item.public()
archive = models.Item.all_public()
if year and month and day:
date = datetime.strptime('%s-%s-%s' % (year, month, day), '%Y-%m-%d')
week = int(date.strftime('%W'))