Make it easier to view agents in the admin page

This commit is contained in:
sabaimran 2024-04-12 13:02:22 +05:30
parent e58bd0e485
commit b86e68a29d

View file

@ -53,11 +53,20 @@ admin.site.register(ReflectiveQuestion)
admin.site.register(UserSearchModelConfig) admin.site.register(UserSearchModelConfig)
admin.site.register(TextToImageModelConfig) admin.site.register(TextToImageModelConfig)
admin.site.register(ClientApplication) admin.site.register(ClientApplication)
admin.site.register(Agent)
admin.site.register(GithubConfig) admin.site.register(GithubConfig)
admin.site.register(NotionConfig) admin.site.register(NotionConfig)
@admin.register(Agent)
class AgentAdmin(admin.ModelAdmin):
list_display = (
"id",
"name",
)
search_fields = ("id", "name")
ordering = ("-created_at",)
@admin.register(Entry) @admin.register(Entry)
class EntryAdmin(admin.ModelAdmin): class EntryAdmin(admin.ModelAdmin):
list_display = ( list_display = (
@ -85,6 +94,7 @@ class ConversationAdmin(admin.ModelAdmin):
"client", "client",
) )
search_fields = ("id", "user__email", "user__username", "client__name") search_fields = ("id", "user__email", "user__username", "client__name")
list_filter = ("agent",)
ordering = ("-created_at",) ordering = ("-created_at",)
actions = ["export_selected_objects", "export_selected_minimal_objects"] actions = ["export_selected_objects", "export_selected_minimal_objects"]