Merge lp:~allenap/launchpad/remove-striped_class into lp:launchpad

Proposed by Gavin Panella
Status: Merged
Approved by: Edwin Grubbs
Approved revision: not available
Merged at revision: not available
Proposed branch: lp:~allenap/launchpad/remove-striped_class
Merge into: lp:launchpad
Diff against target: 40 lines (+0/-16)
1 file modified
lib/canonical/launchpad/webapp/publisher.py (+0/-16)
To merge this branch: bzr merge lp:~allenap/launchpad/remove-striped_class
Reviewer Review Type Date Requested Status
Edwin Grubbs (community) code Approve
Review via email: mp+14996@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Gavin Panella (allenap) wrote :

I noticed that LaunchpadView.striped_class is not used anywhere, and looks odd where it is.

Revision history for this message
Edwin Grubbs (edwin-grubbs) wrote :

Looks good.

-Edwin

review: Approve (code)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'lib/canonical/launchpad/webapp/publisher.py'
--- lib/canonical/launchpad/webapp/publisher.py 2009-11-14 22:44:07 +0000
+++ lib/canonical/launchpad/webapp/publisher.py 2009-11-27 09:41:11 +0000
@@ -38,8 +38,6 @@
38from zope.security.checker import ProxyFactory, NamesChecker38from zope.security.checker import ProxyFactory, NamesChecker
39from zope.traversing.browser.interfaces import IAbsoluteURL39from zope.traversing.browser.interfaces import IAbsoluteURL
4040
41from canonical.cachedproperty import cachedproperty
42from canonical.config import config
43from canonical.launchpad.layers import setFirstLayer, WebServiceLayer41from canonical.launchpad.layers import setFirstLayer, WebServiceLayer
44from canonical.launchpad.webapp.vhosts import allvhosts42from canonical.launchpad.webapp.vhosts import allvhosts
45from canonical.launchpad.webapp.interfaces import (43from canonical.launchpad.webapp.interfaces import (
@@ -232,7 +230,6 @@
232 many templates not set via zcml, or you want to do230 many templates not set via zcml, or you want to do
233 rendering from Python.231 rendering from Python.
234 - isBetaUser <-- whether the logged-in user is a beta tester232 - isBetaUser <-- whether the logged-in user is a beta tester
235 - striped_class<-- a tr class for an alternating row background
236 """233 """
237234
238 def __init__(self, context, request):235 def __init__(self, context, request):
@@ -285,19 +282,6 @@
285 else:282 else:
286 return self.render()283 return self.render()
287284
288 @cachedproperty
289 def striped_class(self):
290 """Return a generator which yields alternating CSS classes.
291
292 This is to be used for HTML tables in which the row colors should be
293 alternated.
294 """
295 def bg_stripe_generator():
296 while True:
297 yield 'white'
298 yield 'shaded'
299 return bg_stripe_generator()
300
301 def _getErrorMessage(self):285 def _getErrorMessage(self):
302 """Property getter for `error_message`."""286 """Property getter for `error_message`."""
303 return self._error_message287 return self._error_message