Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
AE
Sith
Commits
80549c7a
Commit
80549c7a
authored
Sep 04, 2016
by
Sli
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed get_age
parent
e1ce661a
Pipeline
#187
failed with stage
in 1 minute and 50 seconds
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
core/models.py
core/models.py
+3
-1
No files found.
core/models.py
View file @
80549c7a
...
@@ -305,7 +305,9 @@ class User(AbstractBaseUser):
...
@@ -305,7 +305,9 @@ class User(AbstractBaseUser):
"""
"""
Returns the age
Returns the age
"""
"""
return
timezone
.
now
().
year
-
self
.
date_of_birth
.
year
today
=
timezone
.
now
()
born
=
self
.
date_of_birth
return
today
.
year
-
born
.
year
-
((
today
.
month
,
today
.
day
)
<
(
born
.
month
,
born
.
day
))
def
email_user
(
self
,
subject
,
message
,
from_email
=
None
,
**
kwargs
):
def
email_user
(
self
,
subject
,
message
,
from_email
=
None
,
**
kwargs
):
"""
"""
...
...
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