0Pricing
Django Academy · Lesson

collectstatic for Production

Gather static files for deployment.

Dev vs Production

In development Django finds and serves static files for you. In production that auto-serving is off, so you must gather assets into one place first.

Meet collectstatic

The collectstatic command copies every static file from every app into a single output folder, ready for a web server to serve fast.

python manage.py collectstatic

All lessons in this course

  1. STATICFILES and the static Tag
  2. collectstatic for Production
  3. MEDIA_ROOT and File Uploads
  4. ImageField and Serving Uploads
← Back to Django Academy