You don't need STATIC_ROOT while using your dev server.
If you have a look https://docs.djangoproject.com/en/1.3/howto/static-files/#basic-usage it isn't even mentionned in the basic usage section.
Regards,
Xavier.
> --
> You received this message because you are subscribed to the Google Groups "Django users" group.
> To post to this group, send email to django...@googlegroups.com.
> To unsubscribe from this group, send email to django-users...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
>
STATIC_ROOT = os.path.join(PROJECT_ROOT, 'static_root')STATIC_URL = '/static/'STATICFILES_DIRS = (os.path.join(PROJECT_ROOT, 'static/css'),os.path.join(PROJECT_ROOT, 'static/img'),os.path.join(PROJECT_ROOT, 'static/js'),)STATICFILES_FINDERS = ('django.contrib.staticfiles.finders.FileSystemFinder','django.contrib.staticfiles.finders.AppDirectoriesFinder',)
sa@sub:~/0/2/sr$ type tad2; tad2tad2 is aliased to `tree --charset ascii -ad -L 2 -I \.git*\|*\.\~*\|*\.pyc'.|-- bin|-- cache|-- gems| `-- bin|-- include|-- lib|-- log|-- pid|-- pkg|-- pr| |-- apps| |-- config| |-- docs| |-- etc -> etcs/development/| |-- etcs| |-- fixtures| |-- formats| |-- libs| |-- media| |-- media_root| |-- static| |-- static_root| |-- templates| `-- tests|-- sass|-- share|-- sock`-- tmp28 directoriessa@sub:~/0/2/sr$
Here's what I think is semantically good distinction:PROJECT_ROOT = os.path.dirname(os.path.abspath(__file__)) (that's the dir containing your settings.py, that dir is usually one dir below your virtualenv, I simply name it "pr". You can then use PROJECT_ROOT to reference such as:STATIC_ROOT = os.path.join(PROJECT_ROOT, 'static_root')STATIC_URL = '/static/'STATICFILES_DIRS = (os.path.join(PROJECT_ROOT, 'static/css'),os.path.join(PROJECT_ROOT, 'static/img'),os.path.join(PROJECT_ROOT, 'static/js'),)STATICFILES_FINDERS = ('django.contrib.staticfiles.finders.FileSystemFinder','django.contrib.staticfiles.finders.AppDirectoriesFinder',)PROJECT_ROOT, "pr" on the filesystem is what you get when you run django-admin.py startproject pr after you run mkvirtualenv foo.com (foo.com would then be the root of your virtualenv; some also call it SITE_ROOT in Django context because they keep web server config, Sass files, etc. there). Here's the dir structure I came to enjoy, also because it maps nicely to the settings posted above:
Your STATICFILES_DIRS should not be set to static.Create a new theme directory, put your files there and update your STATICFILES_DIRS.Have a look at http://www.linovia.com/blog/django-staticfiles-troubleshooting/ for an example.
Yeah, read that post and I disagree. Introducing yet another name on the filesystem (theme) certainly isn't helping people (this thread and many others show there's enough confusion already). It makes more sense to have a 1:1 mapping between variable naming in settings.py and directories on the filesystem e.g. STATIC_ROOT to static_root, STATIC_DIRS to static/<foo>. Plus, Django is not Joomla or Plone or... so thinking in terms of "themes" is semantically wrong as it makes you think of Django as a CMS (one layer to high).