Skip to content

Commit ec1c77e

Browse files
authored
Merge pull request open5e#536 from tylereed/522-v2-spell-filters
Bringing v2 spell filtering into line with v1
2 parents ed22a65 + 6f3cabe commit ec1c77e

File tree

1 file changed

+17
-5
lines changed

1 file changed

+17
-5
lines changed

api_v2/views/spell.py

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,23 @@ class SpellFilterSet(FilterSet):
1010
class Meta:
1111
model = models.Spell
1212
fields = {
13-
'key': ['in', 'iexact', 'exact' ],
14-
'name': ['iexact', 'exact','contains'],
15-
'document__key': ['in','iexact','exact'],
16-
'document__ruleset__key': ['in','iexact','exact'],
17-
'classes__key': ['in','iexact','exact']
13+
'key': ['in', 'iexact', 'exact'],
14+
'name': ['iexact', 'exact', 'contains', 'icontains'],
15+
'document__key': ['in', 'iexact', 'exact'],
16+
'document__ruleset__key': ['in', 'iexact', 'exact'],
17+
'classes__key': ['in', 'iexact', 'exact'],
18+
'classes__name': ['in'],
19+
'level': ['exact', 'range', 'gt', 'gte', 'lt', 'lte'],
20+
'range': ['exact', 'range', 'gt', 'gte', 'lt', 'lte'],
21+
'school__key': ['exact'],
22+
'school__name': ['in', 'iexact', 'exact'],
23+
'duration': ['in', 'iexact', 'exact'],
24+
'concentration': ['exact'],
25+
'verbal': ['exact'],
26+
'somatic': ['exact'],
27+
'material': ['exact'],
28+
'material_consumed': ['exact'],
29+
'casting_time': ['in', 'iexact', 'exact'],
1830
}
1931

2032
class SpellViewSet(viewsets.ReadOnlyModelViewSet):

0 commit comments

Comments
 (0)