From c19477640c105ff8424424d00142aaa95784f202 Mon Sep 17 00:00:00 2001 From: Gresh <> Date: Sat, 5 Aug 2023 12:18:03 -0400 Subject: [PATCH 01/16] Add title & desc search fields to DocumentviewSet --- api/views.py | 1 + 1 file changed, 1 insertion(+) diff --git a/api/views.py b/api/views.py index 584cb09e..96805e9d 100644 --- a/api/views.py +++ b/api/views.py @@ -95,6 +95,7 @@ class DocumentViewSet(viewsets.ReadOnlyModelViewSet): }) queryset = models.Document.objects.all() serializer_class = serializers.DocumentSerializer + search_fields = ['title', 'desc'] filterset_fields = ( 'slug', 'title', From 1b5c4d5dc53efec8b65ae6af020787bc5e5ea19f Mon Sep 17 00:00:00 2001 From: Gresh <> Date: Sat, 5 Aug 2023 12:18:39 -0400 Subject: [PATCH 02/16] Add desc search field to SpellViewSet --- api/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/views.py b/api/views.py index 96805e9d..a6e16c81 100644 --- a/api/views.py +++ b/api/views.py @@ -143,7 +143,7 @@ class SpellViewSet(viewsets.ReadOnlyModelViewSet): queryset = models.Spell.objects.all() filterset_class=SpellFilter serializer_class = serializers.SpellSerializer - search_fields = ['dnd_class', 'name'] + search_fields = ['dnd_class', 'name', 'desc'] ordering_fields = '__all__' ordering=['name'] filterset_fields = ( From 167a312d0bd4139a45481baf5f71408ba819b115 Mon Sep 17 00:00:00 2001 From: Gresh <> Date: Sat, 5 Aug 2023 12:19:34 -0400 Subject: [PATCH 03/16] Add name & desc search fields to SpellListViewSet --- api/views.py | 1 + 1 file changed, 1 insertion(+) diff --git a/api/views.py b/api/views.py index a6e16c81..ee9fcd0e 100644 --- a/api/views.py +++ b/api/views.py @@ -187,6 +187,7 @@ class SpellListViewSet(viewsets.ReadOnlyModelViewSet): queryset = models.SpellList.objects.all() serializer_class = serializers.SpellListSerializer filterset_class = SpellListFilter + search_fields = ['name', 'desc'] class MonsterFilter(django_filters.FilterSet): From 3e5a951eeeab7a5e25663541fed8fde2a7385cd8 Mon Sep 17 00:00:00 2001 From: Gresh <> Date: Sat, 5 Aug 2023 12:20:13 -0400 Subject: [PATCH 04/16] Add desc search field to MonsterViewSet --- api/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/views.py b/api/views.py index ee9fcd0e..97d059de 100644 --- a/api/views.py +++ b/api/views.py @@ -221,7 +221,7 @@ class MonsterViewSet(viewsets.ReadOnlyModelViewSet): filterset_class = MonsterFilter serializer_class = serializers.MonsterSerializer - search_fields = ['name'] + search_fields = ['name', 'desc'] class BackgroundFilter(django_filters.FilterSet): From 6111777376d50f748c057ec9867bb3339797fcd8 Mon Sep 17 00:00:00 2001 From: Gresh <> Date: Sat, 5 Aug 2023 12:20:39 -0400 Subject: [PATCH 05/16] Add desc search field to BackgroundViewSet --- api/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/views.py b/api/views.py index 97d059de..a79f4737 100644 --- a/api/views.py +++ b/api/views.py @@ -256,7 +256,7 @@ class BackgroundViewSet(viewsets.ReadOnlyModelViewSet): ordering_fields = '__all__' ordering = ['name'] filterset_class = BackgroundFilter - search_fields = ['name'] + search_fields = ['name', 'desc'] class PlaneFilter(django_filters.FilterSet): From c230a48207d94dcba323acbe311db30296c7772a Mon Sep 17 00:00:00 2001 From: Gresh <> Date: Sat, 5 Aug 2023 12:21:13 -0400 Subject: [PATCH 06/16] Add name and desc search fields to PlaneViewSet --- api/views.py | 1 + 1 file changed, 1 insertion(+) diff --git a/api/views.py b/api/views.py index a79f4737..19e6ac37 100644 --- a/api/views.py +++ b/api/views.py @@ -284,6 +284,7 @@ class PlaneViewSet(viewsets.ReadOnlyModelViewSet): queryset = models.Plane.objects.all() serializer_class = serializers.PlaneSerializer filterset_class=PlaneFilter + search_fields = ['name', 'desc'] class SectionFilter(django_filters.FilterSet): From 64ba81cda5fa1f927f4a9450af70385a85432e61 Mon Sep 17 00:00:00 2001 From: Gresh <> Date: Sat, 5 Aug 2023 12:21:45 -0400 Subject: [PATCH 07/16] Add name and desc search fields to SectionViewSet --- api/views.py | 1 + 1 file changed, 1 insertion(+) diff --git a/api/views.py b/api/views.py index 19e6ac37..9d02c7c4 100644 --- a/api/views.py +++ b/api/views.py @@ -315,6 +315,7 @@ class SectionViewSet(viewsets.ReadOnlyModelViewSet): ordering_fields = '__all__' ordering=['name'] filterset_class = SectionFilter + search_fields = ['name', 'desc'] class FeatFilter(django_filters.FilterSet): From dda3e309b2408d770bf5bde187aa1ee01c211774 Mon Sep 17 00:00:00 2001 From: Gresh <> Date: Sat, 5 Aug 2023 12:22:06 -0400 Subject: [PATCH 08/16] Add name and desc search fields to FeatViewSet --- api/views.py | 1 + 1 file changed, 1 insertion(+) diff --git a/api/views.py b/api/views.py index 9d02c7c4..b5d1d167 100644 --- a/api/views.py +++ b/api/views.py @@ -343,6 +343,7 @@ class FeatViewSet(viewsets.ReadOnlyModelViewSet): queryset = models.Feat.objects.all() serializer_class = serializers.FeatSerializer filterset_class = FeatFilter + search_fields = ['name', 'desc'] class ConditionFilter(django_filters.FilterSet): From 42570fcbadbea662e2ae5a7cc1356df5d8b50909 Mon Sep 17 00:00:00 2001 From: Gresh <> Date: Sat, 5 Aug 2023 12:22:41 -0400 Subject: [PATCH 09/16] Add name & desc search fields to ConditionViewSet --- api/views.py | 1 + 1 file changed, 1 insertion(+) diff --git a/api/views.py b/api/views.py index b5d1d167..44ded0bf 100644 --- a/api/views.py +++ b/api/views.py @@ -370,6 +370,7 @@ class ConditionViewSet(viewsets.ReadOnlyModelViewSet): ) queryset = models.Condition.objects.all() serializer_class = serializers.ConditionSerializer + search_fields = ['name', 'desc'] filterset_fields=( 'name', 'document__slug', From d9718b24cbd61104abf9a96aba2c84098ed1117a Mon Sep 17 00:00:00 2001 From: Gresh <> Date: Sat, 5 Aug 2023 12:23:04 -0400 Subject: [PATCH 10/16] Add name & desc search fields to RaceViewSet --- api/views.py | 1 + 1 file changed, 1 insertion(+) diff --git a/api/views.py b/api/views.py index 44ded0bf..16fff808 100644 --- a/api/views.py +++ b/api/views.py @@ -410,6 +410,7 @@ class RaceViewSet(viewsets.ReadOnlyModelViewSet): queryset = models.Race.objects.all() serializer_class = serializers.RaceSerializer filterset_class = RaceFilter + search_fields = ['name', 'desc'] class SubraceFilter(django_filters.FilterSet): # Unused, but could be implemented later. From 73c8ce0464d8e0cb165dc4b137211b09c15fba93 Mon Sep 17 00:00:00 2001 From: Gresh <> Date: Sat, 5 Aug 2023 12:23:27 -0400 Subject: [PATCH 11/16] Add name & desc search fields to SubraceViewSet --- api/views.py | 1 + 1 file changed, 1 insertion(+) diff --git a/api/views.py b/api/views.py index 16fff808..76655c2e 100644 --- a/api/views.py +++ b/api/views.py @@ -438,6 +438,7 @@ class SubraceViewSet(viewsets.ReadOnlyModelViewSet): ) queryset = models.Subrace.objects.all() serializer_class = serializers.SubraceSerializer + search_fields = ['name', 'desc'] filterset_fields=( 'name', 'document__slug', From 50852a8bae3d26f169276149afd4c7b0af67d9e0 Mon Sep 17 00:00:00 2001 From: Gresh <> Date: Sat, 5 Aug 2023 12:23:43 -0400 Subject: [PATCH 12/16] Add name & desc search fields to CharClassViewSet --- api/views.py | 1 + 1 file changed, 1 insertion(+) diff --git a/api/views.py b/api/views.py index 76655c2e..e99fa81a 100644 --- a/api/views.py +++ b/api/views.py @@ -480,6 +480,7 @@ class CharClassViewSet(viewsets.ReadOnlyModelViewSet): queryset = models.CharClass.objects.all() serializer_class = serializers.CharClassSerializer filterset_class = CharClassFilter + search_fields = ['name', 'desc'] class ArchetypeFilter(django_filters.FilterSet): # Unused but could be implemented later. From a5b0f73fb1891ab6c09bae7ba80720f64e109ffe Mon Sep 17 00:00:00 2001 From: Gresh <> Date: Sat, 5 Aug 2023 12:23:58 -0400 Subject: [PATCH 13/16] Add name & desc search fields to ArchetypeViewSet --- api/views.py | 1 + 1 file changed, 1 insertion(+) diff --git a/api/views.py b/api/views.py index e99fa81a..94fea72b 100644 --- a/api/views.py +++ b/api/views.py @@ -508,6 +508,7 @@ class ArchetypeViewSet(viewsets.ReadOnlyModelViewSet): ) queryset = models.Archetype.objects.all() serializer_class = serializers.ArchetypeSerializer + search_fields = ['name', 'desc'] filterset_fields=( 'name', 'document__slug', From 1f424b9ec9c700a5abcacd4559e99672411ccfb8 Mon Sep 17 00:00:00 2001 From: Gresh <> Date: Sat, 5 Aug 2023 12:24:33 -0400 Subject: [PATCH 14/16] Add desc search field to MagicItemViewSet --- api/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/views.py b/api/views.py index 94fea72b..948a9dcd 100644 --- a/api/views.py +++ b/api/views.py @@ -543,7 +543,7 @@ class MagicItemViewSet(viewsets.ReadOnlyModelViewSet): queryset = models.MagicItem.objects.all() serializer_class = serializers.MagicItemSerializer filterset_class = MagicItemFilter - search_fields = ['name'] + search_fields = ['name', 'desc'] class WeaponFilter(django_filters.FilterSet): From cd366e3299104526565ad676989f248299be90b1 Mon Sep 17 00:00:00 2001 From: Gresh <> Date: Sat, 5 Aug 2023 12:24:57 -0400 Subject: [PATCH 15/16] Add desc search field to WeaponViewSet --- api/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/views.py b/api/views.py index 948a9dcd..35071a62 100644 --- a/api/views.py +++ b/api/views.py @@ -575,7 +575,7 @@ class WeaponViewSet(viewsets.ReadOnlyModelViewSet): queryset = models.Weapon.objects.all() serializer_class = serializers.WeaponSerializer filterset_class = WeaponFilter - search_fields = ['name'] + search_fields = ['name', 'desc'] class ArmorFilter(django_filters.FilterSet): From befea1adc5a9b886d237f7f83d8676480c422ea9 Mon Sep 17 00:00:00 2001 From: Gresh <> Date: Sat, 5 Aug 2023 12:25:27 -0400 Subject: [PATCH 16/16] Add desc search field to ArmorViewSet --- api/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/views.py b/api/views.py index 35071a62..00dd2b41 100644 --- a/api/views.py +++ b/api/views.py @@ -605,4 +605,4 @@ class ArmorViewSet(viewsets.ReadOnlyModelViewSet): queryset = models.Armor.objects.all() serializer_class = serializers.ArmorSerializer filterset_class = ArmorFilter - search_fields = ['name'] + search_fields = ['name', 'desc']