forked from DGNum/gestiojeux
feat(FORK): Remove unnecessary fields
This commit is contained in:
parent
448bcad382
commit
541d840727
2 changed files with 95 additions and 11 deletions
|
@ -0,0 +1,95 @@
|
|||
# Generated by Django 4.2.11 on 2024-07-02 22:59
|
||||
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
(
|
||||
"inventory",
|
||||
"0005_alter_category_id_alter_game_id_alter_gamecomment_id_and_more",
|
||||
),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterModelOptions(
|
||||
name="game",
|
||||
options={
|
||||
"ordering": ["title"],
|
||||
"verbose_name": "outil",
|
||||
"verbose_name_plural": "outils",
|
||||
},
|
||||
),
|
||||
migrations.AlterModelOptions(
|
||||
name="gamecomment",
|
||||
options={
|
||||
"ordering": ["created_on"],
|
||||
"verbose_name": "commentaire sur un outil",
|
||||
"verbose_name_plural": "commentaires sur des outils",
|
||||
},
|
||||
),
|
||||
migrations.RemoveField(
|
||||
model_name="game",
|
||||
name="duration",
|
||||
),
|
||||
migrations.RemoveField(
|
||||
model_name="game",
|
||||
name="duration_max",
|
||||
),
|
||||
migrations.RemoveField(
|
||||
model_name="game",
|
||||
name="duration_min",
|
||||
),
|
||||
migrations.RemoveField(
|
||||
model_name="game",
|
||||
name="editor",
|
||||
),
|
||||
migrations.RemoveField(
|
||||
model_name="game",
|
||||
name="game_designer",
|
||||
),
|
||||
migrations.RemoveField(
|
||||
model_name="game",
|
||||
name="illustrator",
|
||||
),
|
||||
migrations.RemoveField(
|
||||
model_name="game",
|
||||
name="nb_player_max",
|
||||
),
|
||||
migrations.RemoveField(
|
||||
model_name="game",
|
||||
name="nb_player_min",
|
||||
),
|
||||
migrations.RemoveField(
|
||||
model_name="game",
|
||||
name="player_range",
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name="game",
|
||||
name="title",
|
||||
field=models.CharField(
|
||||
max_length=256, unique=True, verbose_name="Nom de l'outil"
|
||||
),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name="gamecomment",
|
||||
name="commented_object",
|
||||
field=models.ForeignKey(
|
||||
on_delete=django.db.models.deletion.CASCADE,
|
||||
related_name="comments",
|
||||
to="inventory.game",
|
||||
verbose_name="outil",
|
||||
),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name="gameloan",
|
||||
name="lent_object",
|
||||
field=models.ForeignKey(
|
||||
on_delete=django.db.models.deletion.CASCADE,
|
||||
to="inventory.game",
|
||||
verbose_name="outil emprunté",
|
||||
),
|
||||
),
|
||||
]
|
|
@ -1,20 +1,9 @@
|
|||
<a class="inventory_item game" href="{{ game.get_absolute_url }}">
|
||||
<span class="title">{{ game.title }}</span>
|
||||
<span class="details">
|
||||
<span><i class="fa fa-users" aria-hidden="true"></i> {{ game.get_player_range }}</span>
|
||||
<span><i class="fa fa-clock-o" aria-hidden="true"></i> {{ game.get_duration_range }}</span>
|
||||
<span><i class="fa fa-bookmark"></i> {{ game.category }}</span>
|
||||
{% for tag in game.tags.all %}
|
||||
<span><i class="fa fa-tag" aria-hidden="true"></i> {{ tag }}</span>
|
||||
{% endfor %}
|
||||
{% if game.game_designer %}
|
||||
<span><i class="fa fa-wrench" aria-hidden="true"></i> {{ game.game_designer }}</span>
|
||||
{% endif %}
|
||||
{% if game.illustrator %}
|
||||
<span><i class="fa fa-paint-brush" aria-hidden="true"></i> {{ game.illustrator }}</span>
|
||||
{% endif %}
|
||||
{% if game.editor %}
|
||||
<span><i class="fa fa-cogs" aria-hidden="true"></i> {{ game.editor }}</span>
|
||||
{% endif %}
|
||||
</span>
|
||||
</a>
|
||||
|
|
Loading…
Reference in a new issue