many deck changes, including pentacles to crowns, middle arcana, and major arcana fa icons

This commit is contained in:
Disco DeDisco
2026-04-05 22:32:40 -04:00
parent c7370bda03
commit c3ab78cc57
11 changed files with 254 additions and 30 deletions

View File

@@ -150,7 +150,7 @@ 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)
_suit_order = {"WANDS": 0, "CUPS": 1, "SWORDS": 2, "PENTACLES": 3, "COINS": 4}
_suit_order = {"WANDS": 0, "CUPS": 1, "SWORDS": 2, "PENTACLES": 3, "CROWNS": 3, "COINS": 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),