mirror of
https://github.com/Crocmagnon/charasheet.git
synced 2024-11-22 14:38:03 +01:00
Add money + display notes
This commit is contained in:
parent
c91dedde93
commit
6f392a4603
4 changed files with 50 additions and 2 deletions
|
@ -0,0 +1,33 @@
|
||||||
|
# Generated by Django 4.1.2 on 2022-10-30 15:44
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
("character", "0012_alter_capability_options_alter_character_options_and_more"),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AddField(
|
||||||
|
model_name="character",
|
||||||
|
name="money_pa",
|
||||||
|
field=models.PositiveSmallIntegerField(default=0, verbose_name="PA"),
|
||||||
|
),
|
||||||
|
migrations.AddField(
|
||||||
|
model_name="character",
|
||||||
|
name="money_pc",
|
||||||
|
field=models.PositiveSmallIntegerField(default=0, verbose_name="PC"),
|
||||||
|
),
|
||||||
|
migrations.AddField(
|
||||||
|
model_name="character",
|
||||||
|
name="money_po",
|
||||||
|
field=models.PositiveSmallIntegerField(default=0, verbose_name="PO"),
|
||||||
|
),
|
||||||
|
migrations.AddField(
|
||||||
|
model_name="character",
|
||||||
|
name="money_pp",
|
||||||
|
field=models.PositiveSmallIntegerField(default=0, verbose_name="PP"),
|
||||||
|
),
|
||||||
|
]
|
|
@ -1 +1 @@
|
||||||
0012_alter_capability_options_alter_character_options_and_more
|
0013_character_money_pa_character_money_pc_and_more
|
||||||
|
|
|
@ -133,6 +133,11 @@ class Character(models.Model):
|
||||||
default=0, verbose_name="mana utilisé"
|
default=0, verbose_name="mana utilisé"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
money_pp = models.PositiveSmallIntegerField(default=0, verbose_name="PP")
|
||||||
|
money_po = models.PositiveSmallIntegerField(default=0, verbose_name="PO")
|
||||||
|
money_pa = models.PositiveSmallIntegerField(default=0, verbose_name="PA")
|
||||||
|
money_pc = models.PositiveSmallIntegerField(default=0, verbose_name="PC")
|
||||||
|
|
||||||
notes = models.TextField(blank=True, verbose_name="notes")
|
notes = models.TextField(blank=True, verbose_name="notes")
|
||||||
|
|
||||||
objects = CharacterManager()
|
objects = CharacterManager()
|
||||||
|
|
|
@ -156,10 +156,16 @@
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<p class="card-text">{{ character.equipment|linebreaksbr|default:"Rien ici..." }}</p>
|
<p class="card-text">{{ character.equipment|linebreaksbr|default:"Rien ici..." }}</p>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="card-footer">
|
||||||
|
{{ character.money_pp }} pp,
|
||||||
|
{{ character.money_po }} po,
|
||||||
|
{{ character.money_pa }} pa,
|
||||||
|
{{ character.money_pc }} pc
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<h5 class="mt-3">Voies & Capacités</h5>
|
<h4 class="mt-3">Voies & Capacités</h4>
|
||||||
<div class="row gy-3">
|
<div class="row gy-3">
|
||||||
{% for path, capabilities in character.get_capabilities_by_path.items %}
|
{% for path, capabilities in character.get_capabilities_by_path.items %}
|
||||||
<div class="col-xl-3 col-md-6">
|
<div class="col-xl-3 col-md-6">
|
||||||
|
@ -185,4 +191,8 @@
|
||||||
</div>
|
</div>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
|
<h4 class="mt-3">Notes</h4>
|
||||||
|
<div class="row">
|
||||||
|
{{ character.notes|linebreaks }}
|
||||||
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
Loading…
Reference in a new issue