~launchpad-pqm/launchpad/devel

« back to all changes in this revision

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

  • Committer: Ian Booth
  • Date: 2011-02-23 01:24:09 UTC
  • mto: This revision was merged to the branch mainline in revision 12459.
  • Revision ID: ian.booth@canonical.com-20110223012409-wici52rqbn1zxhtk
Change from using getter methods to properties for exported recipe and build accessors

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
    def view_recipes(self):
30
30
        text = 'View source package recipes'
31
31
        enabled = False
32
 
        if self.context.getRecipes().count():
 
32
        if self.context.recipes.count():
33
33
            enabled = True
34
34
        if not getFeatureFlag(RECIPE_ENABLED_FLAG):
35
35
            enabled = False
51
51
 
52
52
    def initialize(self):
53
53
        super(RecipeListingView, self).initialize()
54
 
        recipes = self.context.getRecipes()
 
54
        recipes = self.context.recipes
55
55
        if recipes.count() == 1:
56
56
            recipe = recipes.one()
57
57
            self.request.response.redirect(canonical_url(recipe))