~psivaa/uci-engine/rabbitmq-restish-with-proxy

« back to all changes in this revision

Viewing changes to ticket_system/project/api.py

  • Committer: Joe Talbott
  • Date: 2014-01-27 14:54:08 UTC
  • mfrom: (126.3.8 webui)
  • mto: This revision was merged to the branch mainline in revision 161.
  • Revision ID: joe.talbott@canonical.com-20140127145408-zpubebx02y6oumxq
merge doanac's cleanup branch

Show diffs side-by-side

added added

removed removed

Lines of Context:
13
13
# You should have received a copy of the GNU Affero General Public License
14
14
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
15
15
 
16
 
from tastypie import fields
17
16
from tastypie.authorization import Authorization
18
17
from tastypie.resources import ModelResource
19
 
from tastypie.constants import ALL
20
18
from project.models import SourcePackage, BinaryPackage
21
19
 
22
20
 
32
30
 
33
31
 
34
32
class BinaryPackageResource(ModelResource):
35
 
    sourcepackage = fields.ToOneField(SourcePackageResource, 'sourcepackage',
36
 
                                      full=True)
37
33
 
38
34
    class Meta:
39
35
        queryset = BinaryPackage.objects.all()
41
37
        authorization = Authorization()
42
38
        filtering = {
43
39
            "name": ('exact', 'iexact', 'startswith', 'istartswith'),
44
 
            "seeded": ALL,
45
40
        }