page:guides:django:cdn assets

Deliver public assets through CDN for Django

Summary

Cdn assets for a Django app on Ample. Verified on Django: a versioned, immutable-cached asset uploaded to a published bucket and served from the CDN URL. Build and start: pip install into .ample/python from requirements.txt, then waitress serving project.wsgi from run.py reading PORT on the python-3.12 template.

Resource Requirements

Prerequisites

Workflow Steps

  1. Build and start
    pip install into .ample/python from requirements.txt, then waitress serving project.wsgi from run.py reading PORT on the python-3.12 template; the server must bind 0.0.0.0 on PORT.
  2. Publish a bucket for public assets
    Publish only the asset bucket; upload versioned keys with an immutable Cache-Control header and build URLs from its public URL.
    Command: ample bucket publish
  3. Verify
    Fetch the live URL and /p/versioned-static-assets on the example; on failure read the build and runtime logs.
    Command: ample logs --kind build

Success Checks

Limitations

Cost Estimate

Next Actions