-------- Original Message --------Subject: trouble with setting static for img and css
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.Visit this group at https://groups.google.com/group/django-users.To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/4bf10da8-e78b-147c-78dd-0d4206143ba9%40jfcomputer.com.For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
Hello,
Hopefully these drawings of mine can help.
How Django static files work in production
If you have trouble understanding
STATIC_ROOT
,STATIC_URL
,collectstatic
, and the web server’s configuration, it’s because some things are better said with pictures than with text. Here are the pictures.https://djangodeployment.com/2016/11/21/how-django-static-files-work-in-production/
Regards,
A.
Antonis Christofides http://djangodeployment.com
No, if you change the STATIC_URL you don't need to run
collectstatic again.
Antonis Christofides http://djangodeployment.com
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CANDKt80eWOa0YfOVgb_z3WEtNgO3WPmO7VNsgyzEtvQdqVM-FA%40mail.gmail.com.
On Thursday 11 May 2017 05:28:33 johnf wrote:
> I have researched this issue and I know all I have to do is read the
> doc's. But I can seem to get the correct path working to allow the
> website to find the correct files in my Media,CSS and JS folders.
Read this wikipedia piece. And then consider that STATIC_URL is the path component and STATIC_ROOT is the local file system.
Unfortunately in an effort to trim down settings.py STATIC_ROOT has been removed in the generated boiler plate somewhere in 1.9 I think, so people fail to understand how things work from just reading the settings as all they see is STATIC_URL.
--
Melvyn Sopacua