git://git.onelab.eu
/
plstackapi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
1f4a665
)
Added deletion check as a default filter of the User model.
author
Sapan Bhatia
<gwsapan@gmail.com>
Tue, 29 Apr 2014 18:41:23 +0000
(14:41 -0400)
committer
Sapan Bhatia
<gwsapan@gmail.com>
Tue, 29 Apr 2014 18:41:23 +0000
(14:41 -0400)
planetstack/core/models/user.py
patch
|
blob
|
history
diff --git
a/planetstack/core/models/user.py
b/planetstack/core/models/user.py
index
ec0f11c
..
dba8956
100644
(file)
--- a/
planetstack/core/models/user.py
+++ b/
planetstack/core/models/user.py
@@
-10,6
+10,9
@@
from timezones.fields import TimeZoneField
# Create your models here.
class UserManager(BaseUserManager):
+ def get_query_set(self):
+ return super(UserManager, self).get_query_set().filter(deleted=False)
+
def create_user(self, email, firstname, lastname, password=None):
"""
Creates and saves a User with the given email, date of