Skip to content

Commit 40f9a40

Browse files
committed
add user fields to django admin
1 parent ca902cc commit 40f9a40

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

api/models/Organization.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,5 +38,8 @@ def save(self, *args: Any, **kwargs: Any) -> None:
3838
self.slug = slugify(self.name)
3939
super().save(*args, **kwargs)
4040

41+
def __str__(self):
42+
return self.name
43+
4144
class Meta:
4245
db_table = "organization"

authorization/admin.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,19 @@ class UserAdmin(BaseUserAdmin):
3838
]
3939
},
4040
),
41+
(
42+
"Profile Information",
43+
{
44+
"fields": [
45+
"bio",
46+
"profile_picture",
47+
"github_profile",
48+
"linkedin_profile",
49+
"twitter_profile",
50+
"location",
51+
]
52+
},
53+
),
4154
] # type: ignore
4255
search_fields = ("username", "email", "first_name", "last_name", "keycloak_id")
4356

0 commit comments

Comments
 (0)