quantum-ai-v2/email_writer/admin.py
Claude 8e075454d4 Add comprehensive agent creation system with template prototype
- Create AGENT_CREATION_GUIDE.md with complete step-by-step instructions
- Add agent_template_prototype.html with full CSS framework and JavaScript utilities
- Implement Email Writer agent as demonstration of template system
- Update CLAUDE.md with agent creation workflow and template guidance
- Include Django patterns, form handling, status polling, and marketplace integration
- Provide reusable components: wallet card, processing status, quick access panel
- Ensure responsive design, accessibility, and consistent user experience

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-25 02:34:46 +05:30

29 lines
1.1 KiB
Python

from django.contrib import admin
from .models import EmailWriterRequest
@admin.register(EmailWriterRequest)
class EmailWriterRequestAdmin(admin.ModelAdmin):
list_display = ['id', 'user', 'email_type', 'recipient', 'tone', 'status', 'created_at']
list_filter = ['email_type', 'tone', 'length', 'status', 'created_at']
search_fields = ['user__username', 'recipient', 'main_message']
readonly_fields = ['id', 'created_at', 'processed_at']
fieldsets = (
('Request Information', {
'fields': ('id', 'user', 'status', 'cost', 'created_at', 'processed_at')
}),
('Email Details', {
'fields': ('email_type', 'recipient', 'subject', 'main_message', 'tone', 'length')
}),
('Results', {
'fields': ('email_content',),
'classes': ('collapse',)
})
)
def get_readonly_fields(self, request, obj=None):
readonly = list(self.readonly_fields)
if obj: # editing an existing object
readonly.extend(['user', 'email_type', 'recipient', 'main_message'])
return readonly