mirror of
https://github.com/thecyberlearn/quantum-ai-v3.git
synced 2026-08-18 14:12:57 +00:00
## Issue Fixed - Data analyzer was returning HTML instead of JSON for AJAX requests - JavaScript was receiving "<\!DOCTYPE..." instead of valid JSON - SyntaxError: Unexpected token '<' in JSON parsing ## Solution - Modified data_analyzer_detail view to handle AJAX POST requests - Added proper X-Requested-With header detection - Integrated form processing directly in detail view - Added data_analyzer_status view for polling mechanism - Updated URL configuration with status endpoint ## Technical Changes - Handle multipart form data for file uploads in detail view - Return proper JsonResponse for AJAX requests - Maintain wallet balance checking and deduction logic - Use 'analysisType' field name to match frontend form - Add status polling URL pattern for consistent API ## Result - Data analyzer now properly returns JSON responses - Form submission works without page reload - Consistent with other working agents (weather, job posting, social ads) - Proper error handling and user feedback 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| migrations | ||
| templates/data_analyzer | ||
| __init__.py | ||
| admin.py | ||
| apps.py | ||
| models.py | ||
| processor.py | ||
| urls.py | ||
| views.py | ||