user admin better organized
This commit is contained in:
@@ -18,10 +18,48 @@ class RowerInline(admin.StackedInline):
|
|||||||
verbose_name_plural = 'rower'
|
verbose_name_plural = 'rower'
|
||||||
filter_horizontal = ('team','friends')
|
filter_horizontal = ('team','friends')
|
||||||
|
|
||||||
|
fieldsets = (
|
||||||
|
('Rower Plan',
|
||||||
|
{'fields':('rowerplan','teamplanexpires','clubsize','protrialexpires','plantrialexpires',)}),
|
||||||
|
('Rower Settings',
|
||||||
|
{'fields':
|
||||||
|
('gdproptin','gdproptindate','weightcategory','sex','birthdate','getemailnotifications',
|
||||||
|
'getimportantemails','emailbounced','defaultlandingpage',
|
||||||
|
'defaulttimezone','showfavoritechartnotes')}),
|
||||||
|
('Rower Zones',
|
||||||
|
{'fields':
|
||||||
|
('ftp','otwslack','pw_ut2','pw_ut1','pw_at','pw_tr','pw_an','max',
|
||||||
|
'rest','ut2','ut1','at','tr','an','hrftp',)}),
|
||||||
|
('Import/Export Keys',
|
||||||
|
{'fields':('c2token','tokenexpirydate','c2refreshtoken','c2_auto_export',
|
||||||
|
'sporttrackstoken','sporttrackstokenexpirydate','sporttracksrefreshtoken',
|
||||||
|
'sporttracks_auto_export',
|
||||||
|
'underarmourtoken','underarmourtokenexpirydate','underarmourrefreshtoken',
|
||||||
|
'mapmyfitness_auto_export',
|
||||||
|
'tptoken','tptokenexpirydate','tprefreshtoken',
|
||||||
|
'trainingpeaks_auto_export',
|
||||||
|
'polartoken','polartokenexpirydate','polarrefreshtoken','polaruserid',
|
||||||
|
'polar_auto_import',
|
||||||
|
'stravatoken','stravaexportas','strava_auto_export',
|
||||||
|
'runkeepertoken','runkeeper_auto_export',)}),
|
||||||
|
('Team',
|
||||||
|
{'fields':('friends','privacy','team')}),
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
#class UserAdmin(UserAdmin):
|
#class UserAdmin(UserAdmin):
|
||||||
class UserAdmin(admin.ModelAdmin):
|
class UserAdmin(admin.ModelAdmin):
|
||||||
inlines = (RowerInline,)
|
inlines = (RowerInline,)
|
||||||
list_display = ('username','email','first_name','last_name','rowerplan')
|
list_display = ('username','email','first_name','last_name','rowerplan')
|
||||||
|
|
||||||
|
fieldsets = (
|
||||||
|
('Personal info',
|
||||||
|
{'fields':
|
||||||
|
('first_name', 'last_name', 'email', 'date_joined', 'last_login',)}),
|
||||||
|
('Permissions',
|
||||||
|
{'fields':
|
||||||
|
('is_active', 'is_staff', 'is_superuser', 'groups', 'user_permissions',)}),)
|
||||||
|
|
||||||
search_fields = ["username","first_name","last_name","email"]
|
search_fields = ["username","first_name","last_name","email"]
|
||||||
|
|
||||||
def rowerplan(self, obj):
|
def rowerplan(self, obj):
|
||||||
|
|||||||
Reference in New Issue
Block a user