0
votes

The way I read understand the Django documentation, the 'django.contrib.staticfiles' app collects static content from apps, put them in the folder specified by STATIC_ROOT. After that it is able to serve from there.

But this works even when the specified folder is non-existing or empty (if 'manage.py collectstatic' has not been called).

How?

The Django test server still serves the files, e.g. the admin media: http://localhost:8000/static/admin/css/base.css

(Django 1.3.1)

1

1 Answers

2
votes

You don't need to collectstatic for local development, only later when you deploy to production:

For local development, if you are using runserver or adding staticfiles_urlpatterns to your URLconf, you’re done with the setup

See:

https://docs.djangoproject.com/en/1.3/howto/static-files/#basic-usage

https://docs.djangoproject.com/en/1.3/howto/static-files/#deploying-static-files-in-a-nutshell