Bump version to 1.3.6 and update NEWS.rst for 1.3.5
[mailman-postorious.git] / src / postorius / context_processors.py
blob7847cf93a126c0cfc5c5f329c7b2e082c5093468
1 # -*- coding: utf-8 -*-
2 # Copyright (C) 2012-2021 by the Free Software Foundation, Inc.
4 # This file is part of Postorius.
6 # Postorius is free software: you can redistribute it and/or modify it under
7 # the terms of the GNU General Public License as published by the Free
8 # Software Foundation, either version 3 of the License, or (at your option)
9 # any later version.
11 # Postorius is distributed in the hope that it will be useful, but WITHOUT
12 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
14 # more details.
16 # You should have received a copy of the GNU General Public License along with
17 # Postorius. If not, see <http://www.gnu.org/licenses/>.
20 import logging
22 from django.utils import timezone
24 from postorius import __version__
27 logger = logging.getLogger(__name__)
28 # The day of the month which we celebrate as Mailman Day!
29 MAILMAN_DAY = 1
32 def postorius(request):
33 """Add template variables to context.
34 """
35 return dict(
36 POSTORIUS_VERSION=__version__,
37 # Mailman Day is first of every month.
38 mailman_day=(timezone.localtime(timezone.now()).day == MAILMAN_DAY),