Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
BDE
Note Kfet 2018
Commits
9125a7b1
Commit
9125a7b1
authored
Jul 19, 2018
by
Hamza Dely
Browse files
[activites/forms] Suppression du InvitationForm, inutilisé
parent
f1389ea3
Changes
2
Hide whitespace changes
Inline
Side-by-side
activites/forms.py
View file @
9125a7b1
...
...
@@ -3,25 +3,3 @@
"""
from
django
import
forms
from
activites.models
import
Invite
class
InvitationForm
(
forms
.
ModelForm
):
"""
Un formulaire pour inviter une personne à une activité donnée
"""
class
Meta
:
model
=
Invite
fields
=
[
'prenom'
,
'nom'
,
'invite_par'
]
def
__init__
(
self
,
*
args
,
**
kwargs
):
self
.
activite
=
kwargs
.
pop
(
'activite'
)
super
().
__init__
(
*
args
,
**
kwargs
)
def
save
(
self
,
*
args
,
**
kwargs
):
"""
Méthode save surchargée pour indiquer l'activité à laquelle
l'invité est convié.
"""
self
.
instance
.
activite
=
self
.
activite
return
super
().
save
(
*
args
,
**
kwargs
)
activites/views.py
View file @
9125a7b1
...
...
@@ -24,7 +24,6 @@ from note_kfet.views.mixins import NoteMixin
from
comptes.models
import
Adherent
from
activites.models
import
Activite
,
Invite
from
activites.forms
import
InvitationForm
from
activites.filters
import
ActiviteRechercheFilter
### Vues concernant les activités
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment