Add RD display

This commit is contained in:
Gabriel Augendre 2022-10-30 23:14:27 +01:00
parent 9969644129
commit 5596c7beda
4 changed files with 39 additions and 10 deletions

View file

@ -0,0 +1,18 @@
# Generated by Django 4.1.2 on 2022-10-30 22:01
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("character", "0017_remove_character_luck_points_max"),
]
operations = [
migrations.AddField(
model_name="character",
name="damage_reduction",
field=models.TextField(blank=True, verbose_name="réduction de dégâts"),
),
]

View file

@ -1 +1 @@
0017_remove_character_luck_points_max
0018_character_damage_reduction

View file

@ -148,6 +148,7 @@ class Character(models.Model):
)
notes = models.TextField(blank=True, verbose_name="notes")
damage_reduction = models.TextField(blank=True, verbose_name="réduction de dégâts")
objects = CharacterManager()

View file

@ -255,15 +255,7 @@
</div>
</div>
<div class="row">
<div class="col-md-4 mb-3">
<div class="card">
<h5 class="card-header">{{ character.racial_capability.name }}</h5>
<div class="card-body">
<p class="card-text">{{ character.racial_capability.description|capfirst }}</p>
</div>
</div>
</div>
<div class="col-md-8">
<div class="col">
<table class="table table-hover table-sm">
<thead>
<tr>
@ -290,6 +282,24 @@
</table>
</div>
</div>
<div class="row">
<div class="col-md-6 mb-3">
<div class="card">
<h5 class="card-header">{{ character.racial_capability.name }}</h5>
<div class="card-body">
<p class="card-text">{{ character.racial_capability.description|capfirst }}</p>
</div>
</div>
</div>
<div class="col-md-6 mb-3">
<div class="card">
<h5 class="card-header">Réduction de dégâts</h5>
<div class="card-body">
<p class="card-text">{{ character.damage_reduction|linebreaksbr|default:"Rien ici..." }}</p>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col">
<div class="card">