Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
AE
Sith
Commits
5355492c
Commit
5355492c
authored
Jul 06, 2016
by
Skia
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Date of birth is no longer mandatory
parent
1feea061
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
40 additions
and
2 deletions
+40
-2
core/migrations/0002_auto_20160705_2303.py
core/migrations/0002_auto_20160705_2303.py
+19
-0
core/migrations/0003_auto_20160705_2304.py
core/migrations/0003_auto_20160705_2304.py
+19
-0
core/models.py
core/models.py
+2
-2
No files found.
core/migrations/0002_auto_20160705_2303.py
0 → 100644
View file @
5355492c
# -*- coding: utf-8 -*-
from
__future__
import
unicode_literals
from
django.db
import
migrations
,
models
class
Migration
(
migrations
.
Migration
):
dependencies
=
[
(
'core'
,
'0001_initial'
),
]
operations
=
[
migrations
.
AlterField
(
model_name
=
'user'
,
name
=
'date_of_birth'
,
field
=
models
.
DateField
(
verbose_name
=
'date of birth'
,
blank
=
True
),
),
]
core/migrations/0003_auto_20160705_2304.py
0 → 100644
View file @
5355492c
# -*- coding: utf-8 -*-
from
__future__
import
unicode_literals
from
django.db
import
migrations
,
models
class
Migration
(
migrations
.
Migration
):
dependencies
=
[
(
'core'
,
'0002_auto_20160705_2303'
),
]
operations
=
[
migrations
.
AlterField
(
model_name
=
'user'
,
name
=
'date_of_birth'
,
field
=
models
.
DateField
(
null
=
True
,
blank
=
True
,
verbose_name
=
'date of birth'
),
),
]
core/models.py
View file @
5355492c
...
...
@@ -75,7 +75,7 @@ class User(AbstractBaseUser, PermissionsMixin):
first_name
=
models
.
CharField
(
_
(
'first name'
),
max_length
=
30
)
last_name
=
models
.
CharField
(
_
(
'last name'
),
max_length
=
30
)
email
=
models
.
EmailField
(
_
(
'email address'
),
unique
=
True
)
date_of_birth
=
models
.
DateField
(
_
(
'date of birth'
))
date_of_birth
=
models
.
DateField
(
_
(
'date of birth'
)
,
blank
=
True
,
null
=
True
)
nick_name
=
models
.
CharField
(
max_length
=
30
,
blank
=
True
)
is_staff
=
models
.
BooleanField
(
_
(
'staff status'
),
...
...
@@ -99,7 +99,7 @@ class User(AbstractBaseUser, PermissionsMixin):
objects
=
UserManager
()
USERNAME_FIELD
=
'username'
REQUIRED_FIELDS
=
[
'email'
,
'date_of_birth'
]
#
REQUIRED_FIELDS = ['email']
class
Meta
:
verbose_name
=
_
(
'user'
)
...
...
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