1
0
Fork 0
mirror of https://github.com/seanmorley15/AdventureLog.git synced 2025-07-20 13:29:37 +02:00

Add public profile to user model

This commit is contained in:
Sean Morley 2024-09-06 19:50:19 -04:00
parent c83ef1e904
commit 711b974add
4 changed files with 69 additions and 3 deletions

View file

@ -46,8 +46,9 @@ from users.models import CustomUser
class CustomUserAdmin(UserAdmin):
model = CustomUser
list_display = ['username', 'email', 'is_staff', 'is_active', 'image_display']
readonly_fields = ('uuid',)
fieldsets = UserAdmin.fieldsets + (
(None, {'fields': ('profile_pic',)}),
(None, {'fields': ('profile_pic', 'uuid', 'public_profile')}),
)
def image_display(self, obj):
if obj.profile_pic: