Skip to content
Snippets Groups Projects
Commit fb5a1486 authored by Dorian Lesbre's avatar Dorian Lesbre
Browse files

Update activity model to reflect transmitted form

parent daa823e3
No related branches found
No related tags found
No related merge requests found
......@@ -16,6 +16,18 @@ class InterludesActivityAdmin(ExportCsvMixin, admin.ModelAdmin):
list_filter = ("display", "must_subscribe", "on_planning")
ordering = ("title", "host_name",)
list_editable = ("display",)
fields = (
"title",
("host_name", "host_email"),
"status", "act_type", "duration",
("min_participants", "max_participants"),
"must_subscribe",
"description",
"display",
"room", "start",
"on_planning",
"notes"
)
list_per_page = 100
@admin.register(InterludesParticipant)
......
......@@ -5,12 +5,40 @@ from accounts.models import EmailUser
class InterludesActivity(models.Model):
"""une activité des interludes (i.e. JDR, murder)..."""
class Status(models.TextChoices):
"""en presentiel ou non"""
PRESENT = "P", _("En présentiel uniquement")
DISTANT = "D", _("En distanciel uniquement")
BOTH = "2", _("Les deux")
class Types(models.TextChoices):
"""types d'activités"""
TOURNAMENT = "Tournoi", _("Tournoi")
GAME = "partie", _("Une partie")
GAMES = "parties", _("Quelques parties")
FREEPLAY = "freeplay", _("Freeplay")
CARD_GAME = "jeu cartes", _("Jeu de cartes")
BOARD_GAME = "jeu plateau", _("Jeu de société")
TABLETOP_RPG = "table RPG", _("Jeu de rôle sur table")
LARGE_RPG = "large RPG", _("Jeu de rôle grandeur nature")
VIDEOGAME = "videogame", _("Jeu vidéo")
PARTYGAME = "partygame", _("Party game")
PUZZLE = "puzzle", _("Puzzle ou analogue")
SECRET_ROLES = "secret roles", _("Jeu à rôles secrets")
COOP = "coop", _("Jeu coopératif")
OTHER = "other", _("Autre")
title = models.CharField("Titre", max_length=200)
status = models.CharField("Présentiel/distanciel", choices=Status.choices, max_length=1)
act_type = models.CharField("Type", choices=Types.choices, max_length=12)
duration = models.DurationField("Durée", help_text="format hh:mm:ss")
max_participants = models.PositiveIntegerField(
"Nombre maximum de participants", help_text="0 pour illimité"
)
min_paricipants = models.PositiveIntegerField(
min_participants = models.PositiveIntegerField(
"Nombre minimum de participants"
)
display = models.BooleanField("afficher dans la liste d'activités", default=False)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment