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
Maxime Bombar
Note Kfet 2015 django
Commits
dc7f7859
Commit
dc7f7859
authored
Mar 22, 2018
by
Antoine Bernard
Browse files
Merge branch 'master' of
https://gitlab.crans.org/bde/note-kfet-2015-django
parents
dfc45975
9020126a
Changes
2
Show whitespace changes
Inline
Side-by-side
note/forms.py
View file @
dc7f7859
...
...
@@ -92,8 +92,8 @@ class CompteRelatedForm(BaseCompteRelatedForm):
bloque
=
forms
.
BooleanField
(
label
=
_
(
u
"Bloquer le compte"
),
required
=
False
)
def
__init__
(
self
,
*
args
,
**
kwargs
):
super
(
CompteRelatedForm
,
self
).
__init__
(
*
args
,
**
kwargs
)
# La section n'est facultative qu'à la préinscription
self
.
fields
[
"section"
].
required
=
True
# La section n'est facultative qu'à la préinscription
et si c'est une personne
self
.
fields
[
"section"
].
required
=
(
self
.
fields
[
"type"
]
==
"personne"
)
class
CompteForm
(
CompteRelatedForm
):
"""Formulaire pour modifier un compte"""
...
...
note/urls.py
View file @
dc7f7859
...
...
@@ -77,7 +77,7 @@ urlpatterns = [
# easter egg
url
(
ur
'^/(?:teapot|the|tea|coffee|cafe)/*$'
,
note
.
views
.
teapot
,
name
=
'teapot'
),
# Page de liste des droits
url
(
ur
'^/listedroits/*$'
,
note
.
views
.
liste_droits
,
name
=
'liste_droits'
)
url
(
ur
'^/listedroits/*$'
,
note
.
views
.
liste_droits
,
name
=
'liste_droits'
)
,
]
urlpatterns
+=
[
...
...
Write
Preview
Supports
Markdown
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