Skip to content
This repository has been archived by the owner on Feb 8, 2024. It is now read-only.
This repository has been archived by the owner on Feb 8, 2024. It is now read-only.

Theme static files not overwriting the the default ones #501

Open
variable opened this issue Mar 17, 2021 · 2 comments
Open

Theme static files not overwriting the the default ones #501

variable opened this issue Mar 17, 2021 · 2 comments

Comments

@variable
Copy link

variable commented Mar 17, 2021

I know quite a few people reported the same warning message:

Found another file with the destination path 'material/imgs/sidenav.svg'. It will be ignored since only the first encountered file is collected. If this is not what you want, make sure every static file has a unique path.
Found another file with the destination path 'material/imgs/background.svg'. It will be ignored since only the first encountered file is collected. If this is not what you want, make sure every static file has a unique path.
Found another file with the destination path 'material/css/materialize.frontend.min.css'. It will be ignored since only the first encountered file is collected. If this is not what you want, make sure every static file has a unique path.
Found another file with the destination path 'material/css/materialize.frontend.css'. It will be ignored since only the first encountered file is collected. If this is not what you want, make sure every static file has a unique path.
Found another file with the destination path 'material/css/materialize.forms.css'. It will be ignored since only the first encountered file is collected. If this is not what you want, make sure every static file has a unique path.
Found another file with the destination path 'material/css/materialize.frontend.print.css'. It will be ignored since only the first encountered file is collected. If this is not what you want, make sure every static file has a unique path.
Found another file with the destination path 'material/css/materialize.css'. It will be ignored since only the first encountered file is collected. If this is not what you want, make sure every static file has a unique path.
0 static files copied to '/srv/www/pmas/public-www/static', 285 unmodified.

But I am more concerned about the 0 static files copied, obviously the theme static files are not collected due to whatever reason. I have compared the static files from the server against the default theme and they are identical. I have made sure the theme is above the material app in INSTALLED_APPS

Any ideas please?

@variable
Copy link
Author

Digging a bit deeper this is just Django's problem, it's using the modification date to see if file has changed, but in my case the dates are the same in different themes so collectstatic didn't pick them up.

The only fix I could do is adding --clear to collectstatic to force refresh.

@merwok
Copy link

merwok commented Jun 4, 2021

Isn’t the problem that you need to have this app higher in INSTALLED_APPS to have its static files or templates found first?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants