Static folders structure in Django 1.4?

convention, directory-structure, django, django-1.4, python

Solution

`STATIC_ROOT` is not related to Python importing, so it totally depends on you. Normally, `myproject/static/`, thus `os.path.join(PROJECT_ROOT, 'static/')` in settings, is easier.

update as San4ez suggested, and notes inside settings.py

# Absolute path to the directory static files should be collected to.  
# Don't put anything in this directory yourself; store your static files  
# in apps' "static/" subdirectories and in STATICFILES_DIRS.  
# Example: "/home/media/media.lawrence.com/static/"  

Better to put static files of the `poll` app into `poll/static/`, according to your structure.

Problem

This is the new project structure (from the Django 1.4 release notes). ``` myproject |-- manage.py |-- myproject | |-- __init__.py | |-- settings.py | |-- urls.py | `-- wsgi.py `-- polls |-- __init__.py |-- models.py |-- tests.py `-- views.py ``` What I am not sure about is whether I should point STATIC_ROOT to `myproject/myproject/static/` (together with settings.py, urls.py...) OR The top-level directory `myproject/static` (next to myproject, myapp1, myapp2)?

Original source