Go to file
Claude 8189cca054 Fix data analyzer JSON response errors
## 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>
2025-07-13 19:34:22 +05:30
.github/workflows Claude Code Review workflow 2025-07-13 11:58:45 +05:30
agent_base Add 5 Whys Analysis Agent with enhanced UX features 2025-07-12 23:08:45 +05:30
authentication Implement comprehensive Django performance optimizations 2025-07-13 13:23:59 +05:30
core Implement comprehensive Django performance optimizations 2025-07-13 13:23:59 +05:30
data_analyzer Fix data analyzer JSON response errors 2025-07-13 19:34:22 +05:30
docs Implement unified CSS system and fix data analyzer network errors 2025-07-13 19:30:04 +05:30
five_whys_analyzer Add 5 Whys Analysis Agent with enhanced UX features 2025-07-12 23:08:45 +05:30
job_posting_generator Implement unified CSS system and fix data analyzer network errors 2025-07-13 19:30:04 +05:30
netcop_hub Implement comprehensive Django performance optimizations 2025-07-13 13:23:59 +05:30
social_ads_generator Implement unified CSS system and fix data analyzer network errors 2025-07-13 19:30:04 +05:30
static Implement unified CSS system and fix data analyzer network errors 2025-07-13 19:30:04 +05:30
templates Fix header mobile UI with dropdown navigation 2025-07-12 19:33:38 +05:30
tests Implement individual agent architecture with simplified template structure 2025-07-10 09:01:11 +05:30
wallet Fix security vulnerabilities and improve environment configuration 2025-07-13 12:30:23 +05:30
weather_reporter Implement unified CSS system and fix data analyzer network errors 2025-07-13 19:30:04 +05:30
.env.example Implement comprehensive Django performance optimizations 2025-07-13 13:23:59 +05:30
.gitignore Add 5 Whys Analysis Agent with enhanced UX features 2025-07-12 23:08:45 +05:30
manage.py Initial Django project setup with working homepage 2025-07-08 16:30:56 +05:30
railway.json Implement PostgreSQL development parity and fix migration conflicts 2025-07-12 09:59:44 +05:30
requirements_clean.txt Add Railway deployment config 2025-07-12 03:43:14 +05:30
requirements-dev.txt Implement comprehensive Django performance optimizations 2025-07-13 13:23:59 +05:30
requirements.txt Implement comprehensive Django performance optimizations 2025-07-13 13:23:59 +05:30
run_dev.sh Fix Railway static files serving with WhiteNoise 2025-07-12 10:38:44 +05:30