Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

collectstatic --clear removes uploaded assets #10

Open
geoffroy-noel-ddh opened this issue Mar 13, 2019 · 0 comments
Open

collectstatic --clear removes uploaded assets #10

geoffroy-noel-ddh opened this issue Mar 13, 2019 · 0 comments
Labels

Comments

@geoffroy-noel-ddh
Copy link
Member

We currently have the media folder inside static:

https://github.com/kingsdigitallab/django-bare-bones/blob/develop/project_name/settings/base.py#L227

The problem is that a call to django collectstatic --clear will delete unique content uploaded by editors (it happened to me once when I tried to tidy up static folder after removing apps from a project; fortunately I had a backup!).

I don't think the 'ignore' feature of collectstatic is used by --clear so probably the cleanest option would be to move 'admin' outside 'static' (and update our default django-nginx templates to add the mapping to media):

https://docs.djangoproject.com/en/2.1/ref/contrib/staticfiles/#collectstatic

@geoffroy-noel-ddh geoffroy-noel-ddh changed the title collectstatic --clear will remove uploaded assets collectstatic --clear removes uploaded assets Mar 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant