#23724: Overwrite mode in django
-------------------------------------+-------------------------------------
     Reporter:  prathik              |                    Owner:  nobody
         Type:  New feature          |                   Status:  new
    Component:  contrib.staticfiles  |                  Version:  1.7
     Severity:  Normal               |               Resolution:
     Keywords:                       |             Triage Stage:
    Has patch:  1                    |  Unreviewed
  Needs tests:  0                    |      Needs documentation:  0
Easy pickings:  0                    |  Patch needs improvement:  0
                                     |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by prathik):

 Yup it's definitely a mistake but we could be mitigating the damage if
 Django prevented `--clear` from happening in this case, at times
 developers don't handle the deployment or there could be multiple
 developers, someone might have not read that warning, thus I think Django
 should at least warn that they are within the app's folder and that what
 is deleted can't be restored by collectstatic.

 Is there a way in which we can prevent collectstatic from deleting the
 folder if it belongs to an app? That is if the STATIC_ROOT points to a
 folder within an app then it shouldn't be deleted or atleast user should
 be warned about the cost.

 Also I think it would be better if --clear only deleted files that belongs
 to Django, this would allow multiple apps (non-django) to write into the
 STATIC_ROOT too. These were the reasons that led to the development of the
 `--overwrite` mode, which doesn't touch any other file apart from that
 which belongs to django.

--
Ticket URL: <https://code.djangoproject.com/ticket/23724#comment:6>
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 django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/065.38912282928f81eaebf4e1c6dd1c5e01%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to