--- /dev/null
+# Patchwork - automated patch tracking system
+# Copyright (C) 2016 Intel Corporation
+#
+# This file is part of the Patchwork package.
+#
+# Patchwork is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# Patchwork is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Patchwork; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+from django.contrib.sites.models import Site
+
+
+def site(request):
+ return {'site': Site.objects.get_current()}
from __future__ import absolute_import
from django.conf import settings
-from django.contrib.sites.models import Site
from django.template import RequestContext
from patchwork.filters import Filters
self.update({
'project': self.project,
- 'site': Site.objects.get_current(),
'settings': settings,
'other_projects': len(self.projects) > 1
})
'django.template.context_processors.static',
'django.template.context_processors.tz',
'django.contrib.messages.context_processors.messages',
+ 'patchwork.context_processors.site',
],
},
},
]
else:
TEMPLATE_DIRS = _TEMPLATE_DIRS
+ TEMPLATE_CONTEXT_PROCESSORS = [
+ 'django.contrib.auth.context_processors.auth',
+ 'django.core.context_processors.debug',
+ 'django.core.context_processors.i18n',
+ 'django.core.context_processors.media',
+ 'django.core.context_processors.static',
+ 'django.core.context_processors.tz',
+ 'django.contrib.messages.context_processors.messages',
+ 'patchwork.context_processors.site',
+ ]
# Email