#22891: Dangerous / Surprising Behavior of "collectstatic --clear"
-------------------------------------+--------------------
Reporter: nina@… | Owner: nobody
Type: Uncategorized | Status: new
Component: contrib.staticfiles | Version: 1.6
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+--------------------
When calling "collectstatic --clear," I would expect that only static
files would be deleted, but in fact all files in the static file folder
were deleted.
I am using storages and s3boto to serve static content and media. Here are
the related settings values:
INSTALLED_APPS = (
...
'storages',
...
'django.contrib.staticfiles',
...
)
AWS_STORAGE_BUCKET_NAME = "bucketname"
MEDIA_ROOT = ''
MEDIA_URL = "//%s.s3.amazonaws.com/" % AWS_STORAGE_BUCKET_NAME
STATICFILES_STORAGE = 'storages.backends.s3boto.S3BotoStorage'
STATIC_ROOT = os.path.join(VAR_ROOT, 'static')
STATIC_URL = 'http://%s.s3.amazonaws.com/' % AWS_STORAGE_BUCKET_NAME
When I ran "collectstatic --clear," the media files and the static files
were deleted, but I would expect that only static files would effected by
this call.
Ideally this command would only effect static files, but at the very least
there would be a warning in the documentation that this deletes all
content in the static folder.
--
Ticket URL: <https://code.djangoproject.com/ticket/22891>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/065.5f7f74392440109a6049f5bd0bc5f5fa%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.