Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Force re-collectstatic with django static?

I need to know if I can "re-collectstatic files" with django static?, for error I deleted a static directory now, I'm trying collectstatic one more time and nothing happen..

Any idea?

like image 354
Asinox Avatar asked Oct 28 '25 16:10

Asinox


2 Answers

I come here to see whether I can re-collectstatic without type 'yes'.

Finally, I find it just have to add --no-input

python manage.py collectstatic --no-input
like image 187
Waket Zheng Avatar answered Oct 31 '25 06:10

Waket Zheng


This will clear current files in the static directory and then collect static.

 python manage.py collectstatic --clear
like image 26
vaseemcholakkan Avatar answered Oct 31 '25 06:10

vaseemcholakkan



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!