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:
21
apps/family/forms.py
Normal file
21
apps/family/forms.py
Normal 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()
|
||||
}
|
Reference in New Issue
Block a user