Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
nk20
Manage
Activity
Members
Labels
Plan
Issues
31
Issue boards
Milestones
Wiki
Code
Merge requests
5
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
BDE
nk20
Commits
bba69f0a
Commit
bba69f0a
authored
4 years ago
by
me5na7qbjqbrp
Browse files
Options
Downloads
Patches
Plain Diff
Give Pikachu as an example
parent
beff8487
No related branches found
Branches containing commit
No related tags found
Tags containing commit
4 merge requests
!104
Beta
,
!98
Morefront
,
!91
Documents
,
!89
Frontnax
Pipeline
#8422
passed with stages
in 3 minutes and 24 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
apps/member/forms.py
+4
-0
4 additions, 0 deletions
apps/member/forms.py
apps/registration/forms.py
+5
-0
5 additions, 0 deletions
apps/registration/forms.py
with
9 additions
and
0 deletions
apps/member/forms.py
+
4
−
0
View file @
bba69f0a
...
...
@@ -41,6 +41,10 @@ class ProfileForm(forms.ModelForm):
last_report
=
forms
.
DateTimeField
(
required
=
False
,
disabled
=
True
,
label
=
_
(
"
Last report date
"
))
def
__init__
(
self
,
*
args
,
**
kwargs
):
super
().
__init__
(
*
args
,
**
kwargs
)
self
.
fields
[
'
address
'
].
widget
.
attrs
.
update
({
"
placeholder
"
:
"
4 avenue des Sciences, 91190 GIF-SUR-YVETTE
"
})
def
save
(
self
,
commit
=
True
):
if
not
self
.
instance
.
section
or
((
"
department
"
in
self
.
changed_data
or
"
promotion
"
in
self
.
changed_data
)
and
"
section
"
not
in
self
.
changed_data
):
...
...
This diff is collapsed.
Click to expand it.
apps/registration/forms.py
+
5
−
0
View file @
bba69f0a
...
...
@@ -22,6 +22,11 @@ class SignUpForm(UserCreationForm):
self
.
fields
[
'
email
'
].
required
=
True
self
.
fields
[
'
email
'
].
help_text
=
_
(
"
This address must be valid.
"
)
# Give some example
self
.
fields
[
'
first_name
'
].
widget
.
attrs
.
update
({
"
placeholder
"
:
"
Sacha
"
})
self
.
fields
[
'
last_name
'
].
widget
.
attrs
.
update
({
"
placeholder
"
:
"
Ketchum
"
})
self
.
fields
[
'
email
'
].
widget
.
attrs
.
update
({
"
placeholder
"
:
"
mail@example.com
"
})
def
clean_username
(
self
):
value
=
self
.
cleaned_data
[
"
username
"
]
if
Alias
.
objects
.
filter
(
normalized_name
=
Alias
.
normalize
(
value
)).
exists
():
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment