From 9b627b3186da4e472de1a96f421335a83cb7b409 Mon Sep 17 00:00:00 2001 From: Gabriel Augendre Date: Sun, 30 Oct 2022 18:33:30 +0100 Subject: [PATCH] Update equipment --- .../character/equipment_display.html | 12 +++++++ .../templates/character/equipment_update.html | 13 +++++++ src/character/templates/character/view.html | 4 +-- src/character/urls.py | 5 +++ src/character/views.py | 36 ++++++++++++------- 5 files changed, 56 insertions(+), 14 deletions(-) create mode 100644 src/character/templates/character/equipment_display.html create mode 100644 src/character/templates/character/equipment_update.html diff --git a/src/character/templates/character/equipment_display.html b/src/character/templates/character/equipment_display.html new file mode 100644 index 0000000..1f7e6fd --- /dev/null +++ b/src/character/templates/character/equipment_display.html @@ -0,0 +1,12 @@ +

+ + Edit + +

+

+ {{ character.equipment|linebreaksbr|default:"Rien ici..." }} +

diff --git a/src/character/templates/character/equipment_update.html b/src/character/templates/character/equipment_update.html new file mode 100644 index 0000000..31ab5aa --- /dev/null +++ b/src/character/templates/character/equipment_update.html @@ -0,0 +1,13 @@ +
+

+ + Save + +

+ {% csrf_token %} + +
diff --git a/src/character/templates/character/view.html b/src/character/templates/character/view.html index af3da94..ece3020 100644 --- a/src/character/templates/character/view.html +++ b/src/character/templates/character/view.html @@ -230,8 +230,8 @@
Équipement
-
-

{{ character.equipment|linebreaksbr|default:"Rien ici..." }}

+
+ {% include "character/equipment_display.html" %}