mirror of
https://github.com/thecyberlearn/quantum-ai.git
synced 2026-08-18 13:12:59 +00:00
- 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>
29 lines
1.1 KiB
Python
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 |