Jacks & Cavaliers replaced in Earthman deck w. Maids & Jacks; numerals or numbers + symbols added to cards; migrations made in apps.epic to rename cards; _tarot_fan.html partial updated accordingly

This commit is contained in:
Disco DeDisco
2026-03-25 00:24:26 -04:00
parent 2f6fc1ff20
commit 4728cde771
5 changed files with 147 additions and 5 deletions

View File

@@ -128,7 +128,11 @@ def tarot_fan(request, deck_id):
deck = get_object_or_404(DeckVariant, pk=deck_id)
if not request.user.unlocked_decks.filter(pk=deck_id).exists():
return HttpResponse(status=403)
cards = list(TarotCard.objects.filter(deck_variant=deck).order_by("arcana", "number"))
_suit_order = {"WANDS": 0, "CUPS": 1, "SWORDS": 2, "COINS": 3, "PENTACLES": 4}
cards = sorted(
TarotCard.objects.filter(deck_variant=deck),
key=lambda c: (0 if c.arcana == "MAJOR" else 1, _suit_order.get(c.suit or "", 9), c.number),
)
return render(request, "apps/gameboard/_partials/_tarot_fan.html", {
"deck": deck,
"cards": cards,