~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/translations/browser/serieslanguage.py

  • Committer: Launchpad Patch Queue Manager
  • Date: 2011-06-08 14:14:38 UTC
  • mfrom: (13162.1.2 bug-735979)
  • Revision ID: launchpad@pqm.canonical.com-20110608141438-8pgj1ataxtz4ef51
[r=jtv][bug=735979] bulk load SourcePackageNames referenced by
        relevant POTemplates in DistroSeriesLanguageView.initialize()

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
from canonical.launchpad.webapp.batching import BatchNavigator
18
18
from canonical.launchpad.webapp.publisher import Navigation
19
19
from lp.app.browser.tales import PersonFormatterAPI
 
20
from lp.registry.model.sourcepackagename import SourcePackageName
 
21
from lp.services.database.bulk import load_related
20
22
from lp.services.propertycache import cachedproperty
21
23
from lp.translations.enums import TranslationPermission
22
24
from lp.translations.interfaces.distroserieslanguage import (
52
54
                self.request)
53
55
            self.pofiles = self.context.getPOFilesFor(
54
56
                self.batchnav.currentBatch())
 
57
            load_related(
 
58
                SourcePackageName, self.batchnav.currentBatch(),
 
59
                ['sourcepackagenameID'])
55
60
        else:
56
61
            self.batchnav = BatchNavigator(self.context.pofiles, self.request)
57
62
            self.pofiles = self.batchnav.currentBatch()