# Autogenerated by the makeresources management command 2015-08-06 11:00 PDT from tastypie.resources import ModelResource from tastypie.fields import ToOneField, ToManyField # pyflakes:ignore from tastypie.constants import ALL, ALL_WITH_RELATIONS # pyflakes:ignore from ietf import api from ietf.mailtrigger.models import * # pyflakes:ignore class RecipientResource(ModelResource): class Meta: queryset = Recipient.objects.all() #resource_name = 'recipient' filtering = { "slug": ALL, "desc": ALL, "template": ALL, } api.mailtrigger.register(RecipientResource()) class MailTriggerResource(ModelResource): to = ToManyField(RecipientResource, 'to', null=True) cc = ToManyField(RecipientResource, 'cc', null=True) class Meta: queryset = MailTrigger.objects.all() #resource_name = 'mailtrigger' filtering = { "slug": ALL, "desc": ALL, "to": ALL_WITH_RELATIONS, "cc": ALL_WITH_RELATIONS, } api.mailtrigger.register(MailTriggerResource())