Introduces a new Campaigns module for uploading campaign presentation PDFs that QC checks reference to validate assets against campaign-specific guidelines (typography, layout, copy, pricing format). Also adds a global pricing reference system that maps country codes to currency symbols and formats for deterministic price/currency validation. - New CampaignPresentation model + campaigns blueprint with CRUD routes - PDF parsing via LlamaParse (text + multimodal page images) - Global pricing PDF parsed into structured JSON lookup - Campaign context injected into both image and video QC executors - Quality checks enhanced with campaign guidelines in LLM prompts - Price/currency check uses global pricing lookup (saves an LLM call) - Campaign dropdown added to HM QC and Video QC configure pages Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
22 lines
589 B
Python
22 lines
589 B
Python
"""
|
|
Campaigns Module Blueprint.
|
|
|
|
Provides campaign presentation management:
|
|
- Upload and parse campaign presentation PDFs
|
|
- Store parsed text and page images for QC reference
|
|
- Upload and manage global pricing reference PDF
|
|
- API endpoints for QC modules to fetch campaign data
|
|
"""
|
|
from flask import Blueprint
|
|
|
|
campaigns_bp = Blueprint(
|
|
'campaigns',
|
|
__name__,
|
|
template_folder='templates',
|
|
static_folder='static',
|
|
static_url_path='/campaigns/static',
|
|
url_prefix='/campaigns'
|
|
)
|
|
|
|
# Import routes after blueprint creation to avoid circular imports
|
|
from . import routes
|