datatracker/ietf/mailtrigger/resources.py
Robert Sparks f5b6465e81 mailtoken becomes mailtrigger
- Legacy-Id: 10090
2015-09-17 20:03:45 +00:00

36 lines
1.1 KiB
Python

# 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())