further fixes for card_multiselect breaking when removing all items; values are now static and quanity is stored in data-quantity. Also fix searching via label and change card_multiselect to accept list of cards instead of card_filter

This commit is contained in:
badblocks 2025-03-13 19:57:32 -07:00
parent b97ddde71c
commit 3df4b41750
7 changed files with 76 additions and 59 deletions

View file

@ -59,8 +59,8 @@ class HomePageView(TemplateView):
def get_context_data(self, **kwargs):
context = super().get_context_data(**kwargs)
# Add available_cards QuerySet so card_multiselect works properly.
context["available_cards"] = Card.objects.all() \
context["cards"] = Card.objects.all() \
.order_by("name", "rarity__pk") \
.select_related("rarity", "cardset") \
.prefetch_related("decks")