Skip to content

Commit

Permalink
Merge pull request #483 from Sturlen/case-insensitive-name-search
Browse files Browse the repository at this point in the history
Query all models by partial match
  • Loading branch information
calumbell authored Jul 29, 2024
2 parents e35081c + 1d033bd commit 8a30726
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions api/filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class Meta:
"exact",
"in",
],
"name": ["iexact", "exact"],
"name": ["iexact", "exact", "icontains"],
"spell_level": ["exact", "range", "gt", "gte", "lt", "lte"],
"target_range_sort": ["exact", "range", "gt", "gte", "lt", "lte"],
"school": [
Expand Down Expand Up @@ -65,7 +65,7 @@ class Meta:
"exact",
"in",
],
"name": ["iexact", "exact"],
"name": ["iexact", "exact", "icontains"],
"desc": ["iexact", "exact", "in", "icontains"],
"document__slug": [
"iexact",
Expand Down Expand Up @@ -111,7 +111,7 @@ class Meta:
"exact",
"in",
],
"name": ["iexact", "exact"],
"name": ["iexact", "exact", "icontains"],
"skill_proficiencies": ["iexact", "exact", "icontains"],
"tool_proficiencies": ["iexact", "exact", "icontains"],
"languages": ["iexact", "exact", "icontains"],
Expand All @@ -136,7 +136,7 @@ class Meta:
"exact",
"in",
],
"name": ["iexact", "exact"],
"name": ["iexact", "exact", "icontains"],
"desc": ["iexact", "exact", "in", "icontains"],
"document__slug": [
"iexact",
Expand All @@ -156,7 +156,7 @@ class Meta:
"exact",
"in",
],
"name": ["iexact", "exact"],
"name": ["iexact", "exact", "icontains"],
"desc": ["iexact", "exact", "in", "icontains"],
"parent": ["iexact", "exact", "in", "icontains"],
"document__slug": [
Expand All @@ -177,7 +177,7 @@ class Meta:
"exact",
"in",
],
"name": ["iexact", "exact"],
"name": ["iexact", "exact", "icontains"],
"desc": ["iexact", "exact", "in", "icontains"],
"document__slug": ["iexact", "exact", "in"],
}
Expand All @@ -193,7 +193,7 @@ class Meta:
"exact",
"in",
],
"name": ["iexact", "exact"],
"name": ["iexact", "exact", "icontains"],
"desc": ["iexact", "exact", "in", "icontains"],
"document__slug": [
"iexact",
Expand All @@ -213,7 +213,7 @@ class Meta:
"exact",
"in",
],
"name": ["iexact", "exact"],
"name": ["iexact", "exact", "icontains"],
"desc": ["iexact", "exact", "in", "icontains"],
"document__slug": ["iexact", "exact", "in"],
"asi_desc": ["iexact", "exact", "icontains"],
Expand All @@ -238,7 +238,7 @@ class Meta:
"exact",
"in",
],
"name": ["iexact", "exact"],
"name": ["iexact", "exact", "icontains"],
"desc": ["iexact", "exact", "in", "icontains"],
"document__slug": [
"iexact",
Expand All @@ -258,7 +258,7 @@ class Meta:
"exact",
"in",
],
"name": ["iexact", "exact"],
"name": ["iexact", "exact", "icontains"],
"desc": ["iexact", "exact", "in", "icontains"],
"hit_dice": ["iexact", "exact", "in"],
"hp_at_1st_level": ["iexact", "exact", "icontains"],
Expand Down Expand Up @@ -289,7 +289,7 @@ class Meta:
"exact",
"in",
],
"name": ["iexact", "exact"],
"name": ["iexact", "exact", "icontains"],
"desc": ["iexact", "exact", "in", "icontains"],
"document__slug": [
"iexact",
Expand All @@ -309,7 +309,7 @@ class Meta:
"exact",
"in",
],
"name": ["iexact", "exact"],
"name": ["iexact", "exact", "icontains"],
"desc": ["iexact", "exact", "in", "icontains"],
"type": ["iexact", "exact", "icontains"],
"rarity": ["iexact", "exact", "icontains"],
Expand All @@ -332,7 +332,7 @@ class Meta:
"exact",
"in",
],
"name": ["iexact", "exact"],
"name": ["iexact", "exact", "icontains"],
"desc": ["iexact", "exact", "in", "icontains"],
"cost": ["iexact", "exact", "icontains"],
"damage_dice": ["iexact", "exact", "icontains"],
Expand All @@ -356,7 +356,7 @@ class Meta:
"exact",
"in",
],
"name": ["iexact", "exact"],
"name": ["iexact", "exact", "icontains"],
"desc": ["iexact", "exact", "in", "icontains"],
"cost": ["iexact", "exact", "icontains"],
"weight": ["iexact", "exact", "icontains"],
Expand Down

0 comments on commit 8a30726

Please sign in to comment.