X-Git-Url: https://git.ozlabs.org/?a=blobdiff_plain;f=apps%2Fpatchwork%2Frequestcontext.py;h=3b1afaf6c849ce5025979f903478aae287c69cf9;hb=51000a47f90ebf808ac70e6bf471717652746c04;hp=cb9a78290909e7f0d392ab66f392ec491c96d654;hpb=c561ebe710d6e6a43aa4afc6c2036a215378ce87;p=patchwork diff --git a/apps/patchwork/requestcontext.py b/apps/patchwork/requestcontext.py index cb9a782..3b1afaf 100644 --- a/apps/patchwork/requestcontext.py +++ b/apps/patchwork/requestcontext.py @@ -19,6 +19,8 @@ from django.template import RequestContext from django.utils.html import escape +from django.contrib.sites.models import Site +from django.conf import settings from patchwork.filters import Filters from patchwork.models import Bundle, Project @@ -47,7 +49,10 @@ class PatchworkRequestContext(RequestContext): super(PatchworkRequestContext, self). \ __init__(request, dict, processors); - self.update({'filters': self.filters}) + self.update({ + 'filters': self.filters, + 'messages': [], + }) if list_view: params = self.filters.params() for param in ['order', 'page']: @@ -65,6 +70,8 @@ class PatchworkRequestContext(RequestContext): self.update({ 'project': self.project, + 'site': Site.objects.get_current(), + 'settings': settings, 'other_projects': len(self.projects) > 1 })