-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(tags): ajouter des étiquettes à un forum (#746)
## Description Lors de la création ou de la mise à jour d'un `Forum` : 🎸 Permettre de selectionner une ou plusieurs étiquettes 🎸 Permettre d'ajouter une ou plusieurs étiquettes inexistantes ## Type de changement 🎢 Nouvelle fonctionnalité (changement non cassant qui ajoute une fonctionnalité). ### Points d'attention 🦺 suite PR #744 ### Captures d'écran (optionnel) Création d'un forum ![image](https://github.com/user-attachments/assets/a2b1da0b-5c99-4476-8808-c5cb81c04e1a) Mise à jour d'un forum, avec plusieurs nouveaux tags séparés par des virgules ![image](https://github.com/user-attachments/assets/8f447d1d-fdaf-4234-bb1b-bc9e46a6f3f7) Résultat de la mise à jour ![image](https://github.com/user-attachments/assets/119e48fd-6962-4301-b774-64ec283bfc7a)
- Loading branch information
1 parent
b82ea73
commit 7f435bb
Showing
9 changed files
with
180 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Generated by Django 5.0.7 on 2024-08-07 14:21 | ||
|
||
import taggit.managers | ||
from django.db import migrations | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [ | ||
("forum", "0016_forum_certified"), | ||
("taggit", "0006_rename_taggeditem_content_type_object_id_taggit_tagg_content_8fc721_idx"), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name="forum", | ||
name="tags", | ||
field=taggit.managers.TaggableManager( | ||
help_text="A comma-separated list of tags.", | ||
through="taggit.TaggedItem", | ||
to="taggit.Tag", | ||
verbose_name="Tags", | ||
), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
51 changes: 51 additions & 0 deletions
51
lacommunaute/forum/tests/__snapshots__/test_forum_updateview.ambr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
# serializer version: 1 | ||
# name: test_selected_tags_are_preloaded[selected_tags_preloaded] | ||
''' | ||
<div class="form-group" id="div_id_tags"> | ||
|
||
|
||
<label class="control-label" for="id_tags"> | ||
Sélectionner un ou plusieurs tags | ||
|
||
<span class="text-muted">(optional)</span> | ||
|
||
</label> | ||
|
||
|
||
|
||
<div class="form-check form-check-inline"> | ||
<input checked="" class="form-check-input" id="id_tags_0" name="tags" type="checkbox" value="9999"/> | ||
<label class="form-check-label tag bg-info-lighter text-info" for="id_tags_0"> | ||
iae | ||
</label> | ||
</div> | ||
|
||
<div class="form-check form-check-inline"> | ||
<input checked="" class="form-check-input" id="id_tags_1" name="tags" type="checkbox" value="10000"/> | ||
<label class="form-check-label tag bg-info-lighter text-info" for="id_tags_1"> | ||
siae | ||
</label> | ||
</div> | ||
|
||
<div class="form-check form-check-inline"> | ||
<input checked="" class="form-check-input" id="id_tags_2" name="tags" type="checkbox" value="10001"/> | ||
<label class="form-check-label tag bg-info-lighter text-info" for="id_tags_2"> | ||
prescripteur | ||
</label> | ||
</div> | ||
|
||
<div class="form-check form-check-inline"> | ||
<input class="form-check-input" id="id_tags_3" name="tags" type="checkbox" value="10002"/> | ||
<label class="form-check-label tag bg-info-lighter text-info" for="id_tags_3"> | ||
undesired_tag | ||
</label> | ||
</div> | ||
|
||
|
||
|
||
|
||
|
||
|
||
</div> | ||
''' | ||
# --- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters