content view template final version

This commit is contained in:
IGNY8 VPS (Salman)
2025-12-25 04:06:19 +00:00
parent 826ad89a3e
commit b0c14ccc32
2 changed files with 159 additions and 19 deletions

View File

@@ -197,12 +197,12 @@ class GenerateImagePromptsFunction(BaseAIFunction):
prompt_text = str(prompt_data)
caption_text = ''
heading = h2_headings[idx] if idx < len(h2_headings) else f"Section {idx + 1}"
heading = h2_headings[idx] if idx < len(h2_headings) else f"Section {idx}"
Images.objects.update_or_create(
content=content,
image_type='in_article',
position=idx + 1,
position=idx, # 0-based position matching section array indices
defaults={
'prompt': prompt_text,
'caption': caption_text,