admin: rm the login_clipper column in the user list
This commit is contained in:
parent
46ef12309a
commit
a53bd94737
1 changed files with 0 additions and 24 deletions
|
@ -100,28 +100,6 @@ class CofProfileInline(admin.StackedInline):
|
|||
inline_classes = ("collapse open",)
|
||||
|
||||
|
||||
class FkeyLookup(object):
|
||||
def __init__(self, fkeydecl, short_description=None, admin_order_field=None):
|
||||
self.fk, fkattrs = fkeydecl.split("__", 1)
|
||||
self.fkattrs = fkattrs.split("__")
|
||||
|
||||
self.short_description = short_description or self.fkattrs[-1]
|
||||
self.admin_order_field = admin_order_field or fkeydecl
|
||||
|
||||
def __get__(self, obj, klass):
|
||||
if obj is None:
|
||||
"""
|
||||
hack required to make Django validate (if obj is
|
||||
None, then we're a class, and classes are callable
|
||||
<wink>)
|
||||
"""
|
||||
return self
|
||||
item = getattr(obj, self.fk)
|
||||
for attr in self.fkattrs:
|
||||
item = getattr(item, attr)
|
||||
return item
|
||||
|
||||
|
||||
def ProfileInfo(field, short_description, boolean=False):
|
||||
def getter(self):
|
||||
try:
|
||||
|
@ -134,7 +112,6 @@ def ProfileInfo(field, short_description, boolean=False):
|
|||
return getter
|
||||
|
||||
|
||||
User.profile_login_clipper = FkeyLookup("profile__login_clipper", "Login clipper")
|
||||
User.profile_phone = ProfileInfo("phone", "Téléphone")
|
||||
User.profile_occupation = ProfileInfo("occupation", "Occupation")
|
||||
User.profile_departement = ProfileInfo("departement", "Departement")
|
||||
|
@ -163,7 +140,6 @@ class UserProfileAdmin(UserAdmin):
|
|||
is_cof.boolean = True
|
||||
|
||||
list_display = UserAdmin.list_display + (
|
||||
"profile_login_clipper",
|
||||
"profile_phone",
|
||||
"profile_occupation",
|
||||
"profile_mailing_cof",
|
||||
|
|
Loading…
Reference in a new issue