~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/code/interfaces/hasrecipes.py

  • Committer: Launchpad Patch Queue Manager
  • Date: 2011-10-19 02:33:39 UTC
  • mfrom: (14162.1.4 bug-870130)
  • Revision ID: launchpad@pqm.canonical.com-20111019023339-1i3g2tzvz00gme5a
[r=gmb][bug=870130] Exclude some problematic attributes from API
 snapshots.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright 2010 Canonical Ltd.  This software is licensed under the
 
1
# Copyright 2010-2011 Canonical Ltd.  This software is licensed under the
2
2
# GNU Affero General Public License version 3 (see the file LICENSE).
3
3
 
4
4
"""Interface definitions for IHasRecipes."""
9
9
    ]
10
10
 
11
11
 
12
 
from zope.interface import (
13
 
    Interface,
14
 
    )
15
 
 
 
12
from lazr.lifecycle.snapshot import doNotSnapshot
16
13
from lazr.restful.declarations import exported
17
14
from lazr.restful.fields import (
18
15
    CollectionField,
19
16
    Reference,
20
17
    )
 
18
from zope.interface import Interface
21
19
 
22
20
from canonical.launchpad import _
23
21
 
 
22
 
24
23
class IHasRecipes(Interface):
25
24
    """An object that has recipes."""
26
25
 
27
 
    recipes = exported(
 
26
    recipes = exported(doNotSnapshot(
28
27
        CollectionField(
29
28
            title=_("All recipes associated with the object."),
30
29
            value_type=Reference(schema=Interface),
31
 
            readonly=True))
 
30
            readonly=True)))