1
0
mirror of https://gitlab.crans.org/bde/nk20 synced 2025-07-19 07:31:24 +02:00

Challenge Update and Create View

This commit is contained in:
Ehouarn
2025-07-17 16:59:57 +02:00
parent 6f4fbecdd0
commit 3ebadf34bc
4 changed files with 62 additions and 3 deletions

21
apps/family/forms.py Normal file
View File

@ -0,0 +1,21 @@
# Copyright (C) 2018-2025 by BDE ENS Paris-Saclay
# SPDX-License-Identifier: GPL-3.0-or-later
from django import forms
from django.forms.widgets import NumberInput
from django.utils.translation import gettext_lazy as _
from note_kfet.inputs import Autocomplete
from .models import Challenge, FamilyMembership, User
class ChallengeUpdateForm(forms.ModelForm):
"""
To update a challenge
"""
class Meta:
model = Challenge
fields = ('name', 'description', 'points',)
widgets = {
"points": NumberInput()
}