{% comment %} Cloudflare Images upload widget. Renders the hidden field that stores the Cloudflare image id, plus a file input that drives the direct-creator upload flow. All behaviour lives in the static asset django_cloudflareimages_toolkit/js/cloudflare_image_widget.js (loaded via the widget's Media), and the styling in the matching .css file -- this template deliberately contains no inline JavaScript or CSS. The per-field configuration (variants, metadata, limits, and the upload endpoint resolved server-side from the named route cloudflare_images:create-upload-url) is emitted once as a json_script block. The script reads it from there, so the markup and the behaviour share a single config and cannot drift apart. Context is assembled in CloudflareImageWidget.get_context (widgets.py). {% endcomment %}
{{ widget.config|json_script:widget.config_id }}