Point Apache at static_root. 

Django apps you install may also include static files, and "collectstatic" 
gathers all of those together and puts them in one place (under STATIC_ROOT). 


From: "sarfaraz ahmed" <findsarfa...@gmail.com> 
To: "Django users" <django-users@googlegroups.com> 
Sent: Wednesday, August 30, 2017 8:58:05 AM 
Subject: Doubts about static files 

Hello Team, 

I have doubts about static files. I read articles on Django but it does not 
clearly states that atleast I got confused. 

STATICFILES_DIRS = [os.path.join(BASE_DIR, "static")] this is my 
STATICFILES_DIRS settings which points out to static folder under my project. 
Also, I can add all the folder from individual app which hold static files here 
so that it search for static files. 
STATIC_ROOT = os.path.join(os.path.dirname(BASE_DIR),'static_root') which 
points out to one level up folder than my project. This is how my project 
folder structures look like 

static_root 
MyProject 
--static 
----CSS 
----JS 
----imgs 
--MyProject 
--MyApp 

When I run collectstatic files moves files from static files from static folder 
to static root. 

Now, my question is when deploy it on apache which folder should I point to in 
my conf files. static_root or static. 

Regards, 
Sarfaraz Ahmed 







-- 
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 [ mailto:django-users+unsubscr...@googlegroups.com | 
django-users+unsubscr...@googlegroups.com ] . 
To post to this group, send email to [ mailto:django-users@googlegroups.com | 
django-users@googlegroups.com ] . 
Visit this group at [ https://groups.google.com/group/django-users | 
https://groups.google.com/group/django-users ] . 
To view this discussion on the web visit [ 
https://groups.google.com/d/msgid/django-users/6b7e06ea-a56b-4b4b-b0ad-79ee4dbc3884%40googlegroups.com?utm_medium=email&utm_source=footer
 | 
https://groups.google.com/d/msgid/django-users/6b7e06ea-a56b-4b4b-b0ad-79ee4dbc3884%40googlegroups.com
 ] . 
For more options, visit [ https://groups.google.com/d/optout | 
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+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@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/36680093.1071353.1504101806381.JavaMail.zimbra%40cybernetik.net.
For more options, visit https://groups.google.com/d/optout.

Reply via email to