mirror of
https://github.com/thecyberlearn/quantum-ai-v2.git
synced 2026-08-18 18:12:58 +00:00
- Add is_locked field to Agent model with migration - Create stable-working-agents branch and v1.0-working tag - Export working agents and user data to backups/ - Implement freeze_agents command to lock/unlock agents - Create restore_working_state command for one-click restoration - Lock current 3 working agents (Social Ads, Job Posting, PDF Summarizer) - Add lock status to admin interface Safe house established! All working agents are now protected. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
25 lines
1.0 KiB
Python
25 lines
1.0 KiB
Python
from django.contrib import admin
|
|
from .models import AgentCategory, Agent, AgentExecution
|
|
|
|
@admin.register(AgentCategory)
|
|
class AgentCategoryAdmin(admin.ModelAdmin):
|
|
list_display = ['name', 'slug', 'is_active', 'created_at']
|
|
list_filter = ['is_active', 'created_at']
|
|
search_fields = ['name', 'description']
|
|
prepopulated_fields = {'slug': ('name',)}
|
|
|
|
@admin.register(Agent)
|
|
class AgentAdmin(admin.ModelAdmin):
|
|
list_display = ['name', 'category', 'price', 'is_active', 'is_locked', 'created_at']
|
|
list_filter = ['category', 'is_active', 'is_locked', 'created_at']
|
|
search_fields = ['name', 'description', 'short_description']
|
|
prepopulated_fields = {'slug': ('name',)}
|
|
readonly_fields = ['created_at', 'updated_at']
|
|
|
|
@admin.register(AgentExecution)
|
|
class AgentExecutionAdmin(admin.ModelAdmin):
|
|
list_display = ['agent', 'user', 'status', 'fee_charged', 'created_at']
|
|
list_filter = ['status', 'created_at', 'agent__category']
|
|
search_fields = ['agent__name', 'user__email']
|
|
readonly_fields = ['created_at', 'completed_at']
|