~benji/launchpad/accordionoverlay

« back to all changes in this revision

Viewing changes to lib/lp/code/browser/sourcepackagerecipelisting.py

  • Committer: Brad Crittenden
  • Date: 2011-01-24 16:53:35 UTC
  • mfrom: (12221.1.38 launchpad)
  • Revision ID: bac@canonical.com-20110124165335-2r566z8wwlr3s3na
MergeĀ fromĀ devel

Show diffs side-by-side

added added

removed removed

Lines of Context:
15
15
 
16
16
from canonical.launchpad.browser.feeds import FeedsMixin
17
17
from canonical.launchpad.webapp import (
 
18
    canonical_url,
18
19
    LaunchpadView,
19
20
    Link,
20
21
    )
47
48
        return 'Source Package Recipes for %(displayname)s' % {
48
49
            'displayname': self.context.displayname}
49
50
 
 
51
    def initialize(self):
 
52
        super(RecipeListingView, self).initialize()
 
53
        recipes = self.context.getRecipes()
 
54
        if recipes.count() == 1:
 
55
            recipe = recipes.one()
 
56
            self.request.response.redirect(canonical_url(recipe))
 
57
 
50
58
 
51
59
class BranchRecipeListingView(RecipeListingView):
52
60