Skip to content

Commit

Permalink
refactor: Add LtiToolOrgAdmin to admin
Browse files Browse the repository at this point in the history
  • Loading branch information
geoff-va committed Aug 8, 2024
1 parent f8e1cb7 commit da5de37
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/lti_1p3_provider/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,14 @@ class LtiProfileAdmin(admin.ModelAdmin):
@admin.register(models.LtiGradedResource)
class LtiGradedResourceAdmin(admin.ModelAdmin):
pass


@admin.register(models.LtiToolOrg)
class LtiTooLOrgAdmin(admin.ModelAdmin):
list_display = ("tool_name", "org_name")

def tool_name(self, obj) -> str:
return f"{obj.tool.title} ({obj.tool.client_id})"

def org_name(self, obj) -> str:
return obj.org.short_name

0 comments on commit da5de37

Please sign in to comment.