Yes. The name is just to remind me that the stuff there is for apache. The only times that Django touches it is during collect static, or during file or image upload (these typically are stored under MEDIA_ROOT.
But all these directories are things that you can configure. Do what makes the most sense to you and your co-developers. Bill On Tue, Feb 19, 2013 at 11:39 AM, frocco <faro...@gmail.com> wrote: > Thank you, > > So you have htdocs directory under each project on your website? > > so mine might look like. > > ntw > htdocs > assets > > > On Tuesday, February 19, 2013 11:18:19 AM UTC-5, ke1g wrote: > >> Yes, 'assets' would work, and yes your would put your static sources >> there. >> >> There are many possibilities. I actually tend to make STATIC_ROOT be >> PROJECT_ROOT/htdocs/static and MEDIA_ROOT be PROJECT_ROOT/htdocs/media and >> add PROJECT_ROOT/static to STATICFIELS_DIRS. I can also put things like >> robots.txt and favicon.ico in PROJECT_ROOT/htdocs/ . Then I add one >> Directory directive to my Apache conf for PROJECT_ROOT/htdocs (you still >> need separate Alias directives for static, media, robots.txt, and >> favicon.ico), and folks who are used to adding stuff to PROJECT_ROOT/static >> do not get confused. But it is a matter of taste. Just remember to run >> manage.py collect static after you modify something in one of the >> STATICFILES_DIRS directories, or in one of the 'static' subdirectories of >> an installed app. >> >> On Tue, Feb 19, 2013 at 10:42 AM, frocco <far...@gmail.com> wrote: >> >>> Thanks for the help. >>> So STATICFILES_DIRS should be something line 'assets' and my static >>> headings and css/js files would live there? >>> >>> On Tuesday, February 19, 2013 10:11:40 AM UTC-5, ke1g wrote: >>> >>>> >>>> >>>> On Mon, Feb 18, 2013 at 1:17 PM, frocco <far...@gmail.com> wrote: >>>> >>>>> Hello, >>>>> I have a site under apache www root. >>>>> www >>>>> mysite >>>>> templates >>>>> media >>>>> static >>>>> >>>>> I am following the two-scoops book. >>>>> The problem is that my app is looking for templates at www/templates >>>>> Here is my settings. >>>>> Thanks >>>>> >>>>> from unipath import Path >>>>> PROJECT_ROOT = Path(__file__).ancestor(3) >>>>> >>>>> MEDIA_ROOT = PROJECT_ROOT.child('media') >>>>> MEDIA_URL = 'http://127.0.0.1:8000/media/' >>>>> >>>>> STATIC_ROOT = PROJECT_ROOT.child('static') >>>>> STATIC_URL = '/static/' >>>>> >>>>> STATICFILES_DIRS = ( >>>>> PROJECT_ROOT.child('static'), >>>>> ) >>>>> >>>>> TEMPLATE_DIRS = ( >>>>> PROJECT_ROOT.child('templates'****), >>>>> ) >>>>> >>>>> I don't know about unipath. It might work just fine. I typically use >>>>> os.path stuff like abspath, dirname, split, and join, or functions I >>>>> define >>>>> myself for the purpose based on the previous operations. You can >>>>> certainly >>>>> see whether they are producing what you expect using "manage.py shell", >>>>> then "from django.conf import settings as s", and "repr(s.TEMPLATE_DIRS)". >>>>> >>>> >>>> I will, however, point out that you seem to be confused about static >>>> files (we're talking Django 1.4, yes?). STATIC_ROOT is the directory that >>>> will be served at STATIC_URL and is also the directory into which the >>>> collectstatic operation of manage.py will write files or links. You should >>>> never put anything there yourself. STATICFILES_DIRS are additional places, >>>> beyond the "static" sub-directories of your installed apps, *FROM* which >>>> collectstatic will get the files that it copies or links into STATIC_ROOT. >>>> STATIC_ROOT should never be included in STATICFILES_DIRS. >>>> >>>> STATICFILES_DIRS are places where you have put, for example, you site >>>> wide css, non-app related JavaScript, static images like backgrounds and >>>> buttons. >>>> STATIC_ROOT is something you arrange for your front end (e.g.; Apache) >>>> to serve, but you never put anything in it except by running manage.py's >>>> collectstatic. >>>> >>>> Bill >>>> >>>> -- >>> 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...@**googlegroups.com. >>> To post to this group, send email to django...@googlegroups.com. >>> >>> Visit this group at >>> http://groups.google.com/**group/django-users?hl=en<http://groups.google.com/group/django-users?hl=en> >>> . >>> For more options, visit >>> https://groups.google.com/**groups/opt_out<https://groups.google.com/groups/opt_out> >>> . >>> >>> >>> >> >> -- > 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 http://groups.google.com/group/django-users?hl=en. > For more options, visit https://groups.google.com/groups/opt_out. > > > -- 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 http://groups.google.com/group/django-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.