mirror of
https://github.com/thecyberlearn/quantum-ai.git
synced 2026-08-18 19:12:58 +00:00
## Issues Fixed - Added missing status endpoint for polling mechanism - Fixed content extraction priority to handle ad_copy field and raw_response.output - Corrected include_emoji field handling (form sends 'yes' not 'on') - Updated URL patterns to include proper status and result endpoints ## Technical Changes - Added social_ads_generator_status() view for polling - Updated content extraction priority: ad_copy_content > content > ad_copy > raw_response.output - Fixed boolean field handling for include_emoji checkbox - Consistent with other agents' polling patterns ## URL Updates - Added /status/<uuid:request_id>/ for polling - Added /result/<uuid:request_id>/ for results - Consistent API structure across all agents ## Content Field Priority Based on actual JSON response showing "output" field: 1. ad_copy_content (primary field) 2. content (fallback) 3. ad_copy (model field) 4. raw_response.output (actual webhook response) 5. formatted_ad (processed content) 6. output_text (legacy field) ## Result - Social ads generator now properly handles form submission - Correct content extraction from webhook response - Consistent polling mechanism with other agents - No more network errors during ad generation 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
10 lines
344 B
Python
10 lines
344 B
Python
from django.urls import path
|
|
from . import views
|
|
|
|
app_name = 'social_ads_generator'
|
|
|
|
urlpatterns = [
|
|
path('', views.social_ads_generator_detail, name='detail'),
|
|
path('status/<uuid:request_id>/', views.social_ads_generator_status, name='status'),
|
|
path('result/<uuid:request_id>/', views.social_ads_generator_result, name='result'),
|
|
] |