Forums

Collect static question

Frist of all thatnks to the crew at PA, we were supposed to recieve some hardware and didn't. That left s scrambling for a way to serve up our ap by this week... It is done so we got to ' beta' on schedule.

When running collect static to my crrent staic file i get a message :

The current contents of the directory will be over written continue yes or no.

I was trying to move the admin static files directory.... but the static directory was already holding the static files for my website(not including the admin directory)

I said no and copied the static/admin directory over manually

So does collect static copy everything (including the contents of the current static directory) and then recopy to the same directory?

I think if you have a separate file/folder within the static files directory that shouldn't get wiped (ie. just stuff with the same name is overwritten). But definitely double check yourself before doing this (eg: create a copy of what might get overwritten before you run this, so you can copy it back in if needed)

Also- you could just use collectstatic in the "right" way- ie. if you move the files that you are worried about being overwritten into a directory that django collects from, and not to, then you won't have this problem and can just overwrite every time?

Ok