quantum-ai-v2/weather_reporter/admin.py
Claude 1aac14f44b Implement individual agent architecture with simplified template structure
- Replace legacy agents system with modular individual agent apps
- Add agent_base framework for BaseAgent, processors, and management commands
- Create weather_reporter as example individual agent with API integration
- Implement simplified template structure: agent_name/templates/detail.html
- Fix marketplace to display actual agents instead of placeholder
- Add proper authentication flow with login redirect for agent access
- Organize project structure: move tests to tests/, docs to docs/
- Update all documentation to reflect new simplified architecture
- Fix URL namespace issues throughout templates and views

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-10 09:01:11 +05:30

20 lines
807 B
Python

from django.contrib import admin
from .models import WeatherReporterRequest, WeatherReporterResponse
@admin.register(WeatherReporterRequest)
class WeatherReporterRequestAdmin(admin.ModelAdmin):
list_display = ['user', 'agent', 'status', 'cost', 'created_at']
list_filter = ['status', 'created_at', 'agent']
search_fields = ['user__email', 'user__username']
readonly_fields = ['id', 'created_at', 'processed_at']
@admin.register(WeatherReporterResponse)
class WeatherReporterResponseAdmin(admin.ModelAdmin):
list_display = ['request', 'success', 'processing_time', 'created_at']
list_filter = ['success', 'created_at']
readonly_fields = ['id', 'created_at']
def get_queryset(self, request):
return super().get_queryset(request).select_related('request__user')