~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/registry/browser/distributionsourcepackage.py

  • Committer: Launchpad Patch Queue Manager
  • Date: 2011-08-03 05:04:47 UTC
  • mfrom: (13590.2.1 fix-dsp-index)
  • Revision ID: launchpad@pqm.canonical.com-20110803050447-fol75yvd2243g6m6
[r=stevenk][bug=820174][rollback=13548] Fix DSP:+index expanders by
 using IJSONRequestCache instead of touching LP.cache directly.

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
import operator
22
22
 
23
23
from lazr.delegates import delegates
 
24
from lazr.restful.interfaces import IJSONRequestCache
24
25
import pytz
25
26
from zope.component import (
26
27
    adapter,
336
337
        super(DistributionSourcePackageView, self).initialize()
337
338
        expose_structural_subscription_data_to_js(
338
339
            self.context, self.request, self.user)
 
340
        IJSONRequestCache(self.request).objects['archive_context_url'] = (
 
341
            canonical_url(
 
342
                self.context.latest_overall_publication.archive,
 
343
                path_only_if_possible=True))
339
344
 
340
345
    @property
341
346
    def label(self):