You have created {{ characters|map(attribute="user_id")|select("equalto", current_user.id)|list|count }} out of {{ g.lexicon.character_limit }} allowed characters.
Player: {{ character.user.username }}
{% if character.user == current_user %} - + {% endif %} {% endfor %} diff --git a/amanuensis/server/macros.jinja b/amanuensis/server/macros.jinja index 7d06006..f361c16 100644 --- a/amanuensis/server/macros.jinja +++ b/amanuensis/server/macros.jinja @@ -3,7 +3,7 @@- {{ lexicon.full_title }} + {{ lexicon.full_title }} [{{ status.capitalize() }}]
@@ -29,7 +29,7 @@ Players: {{ lexicon.memberships|count }}{% if lexicon.player_limit is not none %} / {{ lexicon.player_limit }}{% endif -%} {%- if lexicon.public and lexicon.joinable - %} / Join game + %} / Join game {%- endif -%} {%- endif -%} diff --git a/tests/test_character.py b/tests/test_character.py index ccd5b51..176bbc5 100644 --- a/tests/test_character.py +++ b/tests/test_character.py @@ -32,12 +32,12 @@ def test_character_view(db: DbContext, app: Flask, make: ObjectFactory): assert mem # The character page exists - list_url = url_for("lexicon.characters.list", name=lexicon.name) + list_url = url_for("lexicon.characters.list", lexicon_name=lexicon.name) response = client.get(list_url) assert response.status_code == 200 assert charname.encode("utf8") not in response.data assert char_sig.encode("utf8") not in response.data - new_url = url_for("lexicon.characters.new", name=lexicon.name) + new_url = url_for("lexicon.characters.new", lexicon_name=lexicon.name) assert new_url.encode("utf8") in response.data # The character creation endpoint works