Skip to content

Commit

Permalink
add admin
Browse files Browse the repository at this point in the history
  • Loading branch information
jefer94 committed May 18, 2024
1 parent b77cc3d commit f88a268
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ path = "src/linked_services/__about__.py"

[tool.hatch.envs.default]
dependencies = [
"pytz",
"coverage[toml]>=6.5",
"pytest",
"pytest-django",
Expand Down
18 changes: 18 additions & 0 deletions src/linked_services/django/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
AppOptionalScope,
AppRequiredScope,
AppUserAgreement,
FirstPartyCredentials,
FirstPartyWebhookLog,
LegacyKey,
OptionalScopeSet,
Scope,
Expand Down Expand Up @@ -60,3 +62,19 @@ class AppUserAgreementAdmin(admin.ModelAdmin):
search_fields = ["user__username", "user__email", "user__first_name", "user__last_name", "app__name", "app__slug"]
list_filter = ["app"]
actions = []


@admin.register(FirstPartyWebhookLog)
class FirstPartyWebhookLogAdmin(admin.ModelAdmin):
list_display = ("id", "app", "type", "user_id", "external_id", "url", "processed", "attempts", "status")
search_fields = ["user_id", "external_id", "url", "app__name", "app__slug"]
list_filter = ["app", "admin", "processed", "status"]
actions = []


@admin.register(FirstPartyCredentials)
class FirstPartyCredentialsAdmin(admin.ModelAdmin):
list_display = ("id", "user", "app")
search_fields = ["user__username", "user__email", "user__first_name", "user__last_name", "app__name", "app__slug"]
list_filter = ["app"]
actions = []

0 comments on commit f88a268

Please sign in to comment.