Skip to content

Commit 770b36d

Browse files
committed
Added generated (and sometimes manually tweaked) resources.py files.
- Legacy-Id: 8744
1 parent 147cc96 commit 770b36d

15 files changed

Lines changed: 1952 additions & 0 deletions

File tree

ietf/community/resources.py

Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
# Autogenerated by the mkresources management command 2014-11-13 23:53
2+
from tastypie.resources import ModelResource
3+
from tastypie.fields import ToOneField, ToManyField
4+
from tastypie.constants import ALL, ALL_WITH_RELATIONS
5+
6+
from ietf import api
7+
8+
from ietf.community.models import * # pyflakes:ignore
9+
10+
11+
from ietf.doc.resources import DocumentResource
12+
from ietf.group.resources import GroupResource
13+
from ietf.utils.resources import UserResource
14+
class CommunityListResource(ModelResource):
15+
user = ToOneField(UserResource, 'user', null=True)
16+
group = ToOneField(GroupResource, 'group', null=True)
17+
added_ids = ToManyField(DocumentResource, 'added_ids', null=True)
18+
class Meta:
19+
queryset = CommunityList.objects.all()
20+
#resource_name = 'communitylist'
21+
filtering = {
22+
"id": ALL,
23+
"secret": ALL,
24+
"cached": ALL,
25+
"user": ALL_WITH_RELATIONS,
26+
"group": ALL_WITH_RELATIONS,
27+
"added_ids": ALL_WITH_RELATIONS,
28+
}
29+
api.community.register(CommunityListResource())
30+
31+
from ietf.doc.resources import DocumentResource
32+
class ExpectedChangeResource(ModelResource):
33+
community_list = ToOneField(CommunityListResource, 'community_list')
34+
document = ToOneField(DocumentResource, 'document')
35+
class Meta:
36+
queryset = ExpectedChange.objects.all()
37+
#resource_name = 'expectedchange'
38+
filtering = {
39+
"id": ALL,
40+
"expected_date": ALL,
41+
"community_list": ALL_WITH_RELATIONS,
42+
"document": ALL_WITH_RELATIONS,
43+
}
44+
api.community.register(ExpectedChangeResource())
45+
46+
class DisplayConfigurationResource(ModelResource):
47+
community_list = ToOneField(CommunityListResource, 'community_list')
48+
class Meta:
49+
queryset = DisplayConfiguration.objects.all()
50+
#resource_name = 'displayconfiguration'
51+
filtering = {
52+
"id": ALL,
53+
"sort_method": ALL,
54+
"display_fields": ALL,
55+
"community_list": ALL_WITH_RELATIONS,
56+
}
57+
api.community.register(DisplayConfigurationResource())
58+
59+
from ietf.doc.resources import DocEventResource
60+
class ListNotificationResource(ModelResource):
61+
event = ToOneField(DocEventResource, 'event')
62+
class Meta:
63+
queryset = ListNotification.objects.all()
64+
#resource_name = 'listnotification'
65+
filtering = {
66+
"id": ALL,
67+
"significant": ALL,
68+
"event": ALL_WITH_RELATIONS,
69+
}
70+
api.community.register(ListNotificationResource())
71+
72+
from ietf.doc.resources import DocumentResource
73+
class RuleResource(ModelResource):
74+
community_list = ToOneField(CommunityListResource, 'community_list')
75+
cached_ids = ToManyField(DocumentResource, 'cached_ids', null=True)
76+
class Meta:
77+
queryset = Rule.objects.all()
78+
#resource_name = 'rule'
79+
filtering = {
80+
"id": ALL,
81+
"rule_type": ALL,
82+
"value": ALL,
83+
"last_updated": ALL,
84+
"community_list": ALL_WITH_RELATIONS,
85+
"cached_ids": ALL_WITH_RELATIONS,
86+
}
87+
api.community.register(RuleResource())
88+
89+
class EmailSubscriptionResource(ModelResource):
90+
community_list = ToOneField(CommunityListResource, 'community_list')
91+
class Meta:
92+
queryset = EmailSubscription.objects.all()
93+
#resource_name = 'emailsubscription'
94+
filtering = {
95+
"id": ALL,
96+
"email": ALL,
97+
"significant": ALL,
98+
"community_list": ALL_WITH_RELATIONS,
99+
}
100+
api.community.register(EmailSubscriptionResource())
101+
102+
from ietf.doc.resources import DocumentResource
103+
class DocumentChangeDatesResource(ModelResource):
104+
document = ToOneField(DocumentResource, 'document')
105+
class Meta:
106+
queryset = DocumentChangeDates.objects.all()
107+
#resource_name = 'documentchangedates'
108+
filtering = {
109+
"id": ALL,
110+
"new_version_date": ALL,
111+
"normal_change_date": ALL,
112+
"significant_change_date": ALL,
113+
"document": ALL_WITH_RELATIONS,
114+
}
115+
api.community.register(DocumentChangeDatesResource())
116+

ietf/dbtemplate/resources.py

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Autogenerated by the mkresources management command 2014-11-13 23:53
2+
from tastypie.resources import ModelResource
3+
from tastypie.fields import ToOneField
4+
from tastypie.constants import ALL, ALL_WITH_RELATIONS
5+
6+
from ietf import api
7+
8+
from ietf.dbtemplate.models import * # pyflakes:ignore
9+
10+
11+
from ietf.group.resources import GroupResource
12+
from ietf.name.resources import DBTemplateTypeNameResource
13+
class DBTemplateResource(ModelResource):
14+
type = ToOneField(DBTemplateTypeNameResource, 'type')
15+
group = ToOneField(GroupResource, 'group', null=True)
16+
class Meta:
17+
queryset = DBTemplate.objects.all()
18+
#resource_name = 'dbtemplate'
19+
filtering = {
20+
"id": ALL,
21+
"path": ALL,
22+
"title": ALL,
23+
"variables": ALL,
24+
"content": ALL,
25+
"type": ALL_WITH_RELATIONS,
26+
"group": ALL_WITH_RELATIONS,
27+
}
28+
api.dbtemplate.register(DBTemplateResource())
29+

0 commit comments

Comments
 (0)