launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #04469
[Merge] lp:~wgrant/launchpad/fix-dsp-index into lp:launchpad
William Grant has proposed merging lp:~wgrant/launchpad/fix-dsp-index into lp:launchpad.
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
Related bugs:
Bug #820174 in Launchpad itself: "Expanders on DistributionSourcePackage:+index broken by LP.cache changes"
https://bugs.launchpad.net/launchpad/+bug/820174
For more details, see:
https://code.launchpad.net/~wgrant/launchpad/fix-dsp-index/+merge/70249
Make DSP:+index use IJSONRequestCache rather than manipulating LP.cache directly. That doesn't work since r13548, which changes base-layout to clobber LP.cache rather than just setting the relevant entries.
--
https://code.launchpad.net/~wgrant/launchpad/fix-dsp-index/+merge/70249
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~wgrant/launchpad/fix-dsp-index into lp:launchpad.
=== modified file 'lib/lp/registry/browser/distributionsourcepackage.py'
--- lib/lp/registry/browser/distributionsourcepackage.py 2011-07-28 17:34:34 +0000
+++ lib/lp/registry/browser/distributionsourcepackage.py 2011-08-03 04:53:24 +0000
@@ -21,6 +21,7 @@
import operator
from lazr.delegates import delegates
+from lazr.restful.interfaces import IJSONRequestCache
import pytz
from zope.component import (
adapter,
@@ -336,6 +337,10 @@
super(DistributionSourcePackageView, self).initialize()
expose_structural_subscription_data_to_js(
self.context, self.request, self.user)
+ IJSONRequestCache(self.request).objects['archive_context_url'] = (
+ canonical_url(
+ self.context.latest_overall_publication.archive,
+ path_only_if_possible=True))
@property
def label(self):
=== modified file 'lib/lp/registry/templates/distributionsourcepackage-index.pt'
--- lib/lp/registry/templates/distributionsourcepackage-index.pt 2011-07-15 11:18:47 +0000
+++ lib/lp/registry/templates/distributionsourcepackage-index.pt 2011-08-03 04:53:24 +0000
@@ -188,8 +188,6 @@
</tal:rows>
</table>
- <script
- tal:content="string:LP.cache['archive_context_url'] = '${archive/fmt:url}';"></script>
<metal:js use-macro="archive/@@+macros/expandable-table-js"/>
</div>