示例#1
0
 def initialize(self):
     """Initialize the view to handle the request."""
     LaunchpadView.initialize(self)
     cache = IJSONRequestCache(self.request).objects
     self.extractBugSubscriptionDetails(self.user, self.context, cache)
     cache['bug_is_private'] = self.context.private
     if self.user:
         cache['notifications_text'] = self.notifications_text
 def test_JsonModelNamespace_traverse_LPView(self):
     # Test traversal for JSON model namespace,
     # ++model++ for a non-LaunchpadView context.
     request = get_current_browser_request()
     context = object()
     view = LaunchpadView(context, request)
     namespace = JsonModelNamespaceView(view, request)
     result = namespace.traverse(view, None)
     self.assertEqual(result, namespace)
示例#3
0
 def render(self):
     if self.dupe_email:
         return LaunchpadView.render(self)
     else:
         return ''
示例#4
0
 def __init__(self, context, request):
     # We use the current bug task as the context in order to get the
     # menu and portlets working.
     bugtask = getUtility(ILaunchBag).bugtask
     LaunchpadView.__init__(self, bugtask, request)
     self.comment = context
示例#5
0
 def render(self):
     if self.dupe_email:
         return LaunchpadView.render(self)
     else:
         return ''
示例#6
0
 def __init__(self, context, request, system_name):
     LaunchpadView.__init__(self, context, request)
     self.system_name = system_name
示例#7
0
 def render(self):
     self.request.response.setHeader('content-type',
                                     'text/xml;charset=utf-8')
     body = LaunchpadView.render(self)
     return body.encode('utf-8')
示例#8
0
 def __init__(self, context, request):
     # We use the current bug task as the context in order to get the
     # menu and portlets working.
     bugtask = getUtility(ILaunchBag).bugtask
     LaunchpadView.__init__(self, bugtask, request)
     self.comment = context
示例#9
0
 def __init__(self, context,  request, system_name):
     LaunchpadView.__init__(self, context, request)
     self.system_name = system_name
示例#10
0
 def render(self):
     self.request.response.setHeader("content-type", "text/xml;charset=utf-8")
     body = LaunchpadView.render(self)
     return body.encode("utf-8")