Skip to content

Commit

Permalink
Add to admin site the impostor model
Browse files Browse the repository at this point in the history
  • Loading branch information
luisza committed May 12, 2024
1 parent a5c1acd commit 9112e8a
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/auth_and_perms/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,14 @@ class ProfileAdmin(admin.ModelAdmin):

class ProfilePermissionAdmin(admin.ModelAdmin):
search_fields = ['profile__user__email']

class ImpostorAdmin(admin.ModelAdmin):
search_fields = ['impostor__username','imposted_as__username']
list_display = ['__str__', 'impostor_ip', 'logged_in', 'logged_out']
date_hierarchy = 'logged_in'

admin.site.register(models.AuthorizedApplication, AuthorizedApplicationAdmin)
admin.site.register(models.Profile, ProfileAdmin)
admin.site.register(models.Rol, RolAdmin)
admin.site.register(models.ProfilePermission, ProfilePermissionAdmin)
admin.site.register(models.ImpostorLog, ImpostorAdmin)

0 comments on commit 9112e8a

Please sign in to comment.