Skip to content

Stop loading CSS, JS from third-party CDNs - #11

Open
FestplattenSchnitzel wants to merge 2 commits into
masterfrom
self_host_static_files
Open

Stop loading CSS, JS from third-party CDNs#11
FestplattenSchnitzel wants to merge 2 commits into
masterfrom
self_host_static_files

Conversation

@FestplattenSchnitzel

Copy link
Copy Markdown
Member

No description provided.

@ibot3

ibot3 commented Dec 16, 2022

Copy link
Copy Markdown
Member

Looks good but it may not work in production because there the app is mounted in a subdirectory. And until now I did not get django to work correctly in this scenario. It always tried to load the static resources from the root /.

But we can try. And there already was a plan to migrate the application to a subdomain.

@mmarx

mmarx commented Dec 17, 2022

Copy link
Copy Markdown
Member

Looks good but it may not work in production because there the app is mounted in a subdirectory. And until now I did not get django to work correctly in this scenario. It always tried to load the static resources from the root /.

In theory, all you need to do is set STATIC_URL correctly and run manage.py collectstatic

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants