~launchpad-pqm/launchpad/devel

« back to all changes in this revision

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

  • Committer: Launchpad Patch Queue Manager
  • Date: 2011-07-28 17:34:34 UTC
  • mfrom: (13506.9.10 dsp-vocab-contracts)
  • Revision ID: launchpad@pqm.canonical.com-20110728173434-xm8jb9xmnhjuzb0i
[r=jcsackett][bug=817066] Fix DSP vocabs contract with
 IHugeVocabulary and its widgets. Added IDistribution adapters.

Show diffs side-by-side

added added

removed removed

Lines of Context:
41
41
    )
42
42
from zope.formlib.form import Fields
43
43
from zope.interface import (
44
 
    implementer,
45
44
    implements,
46
45
    Interface,
47
46
    )
84
83
    )
85
84
from lp.app.browser.tales import CustomizableFormatter
86
85
from lp.app.enums import ServiceUsage
87
 
from lp.app.interfaces.launchpad import IServiceUsage
88
86
from lp.app.widgets.itemswidgets import LaunchpadRadioWidget
89
87
from lp.bugs.browser.bugtask import BugTargetTraversalMixin
90
88
from lp.registry.browser.product import ProjectAddStepOne
190
188
 
191
189
 
192
190
@adapter(ISourcePackage)
193
 
@implementer(IServiceUsage)
194
 
def distribution_from_sourcepackage(package):
195
 
    return package.distribution
196
 
 
197
 
 
198
 
@adapter(ISourcePackage)
199
191
class SourcePackageBreadcrumb(Breadcrumb):
200
192
    """Builds a breadcrumb for an `ISourcePackage`."""
201
193
    implements(IBreadcrumb)