jezdez/django-staticfiles — Issue #24: django 1.2 can not use 1.1+
Author: akumria
Created: 2012-01-31 11:44:43+00:00
State: open

It is not clear to me whether or not Django 1.2 is supposed to be able to use django-staticfiles 1.1+

The changelog for v1.1 says:
"Updated list of supported Django versions: 1.2.X, 1.3.X and 1.4.X"

However with Django 1.2.7 and django-staticfiles v1.1.2, configured with:

in settings.py

STATIC_ROOT = os.path.join(ROOT_PATH, '..', 'docroot')

STATIC_URL = '/static-new/'

STATICFILES_DIRS = (
os.path.join(ROOT_PATH, 'static'),
)

Running collectstatic returns:
% python film/manage.py collectstatic -h
Traceback (most recent call last):
File "film/manage.py", line 11, in
execute_manager(settings)
File "/home/anand/Work//-env/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 438, in execute_manager
utility.execute()
File "/home/anand/Work//-env/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 379, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/home/anand/Work//-env/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 261, in fetch_command
klass = load_command_class(app_name, subcommand)
File "/home/anand/Work//-env/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 68, in load_command_class
return module.Command()
File "/home/anand/Work///film/apps/staticfiles/management/commands/collectstatic.py", line 54, in __init__
self.storage.path('')
File "/home/anand/Work//-env/local/lib/python2.7/site-packages/django/utils/functional.py", line 276, in __getattr__
self._setup()
File "/home/anand/Work///film/../film/apps/staticfiles/storage.py", line 262, in _setup
self._wrapped = get_storage_class(settings.STATICFILES_STORAGE)()
File "/home/anand/Work//-env/local/lib/python2.7/site-packages/django/utils/functional.py", line 277, in __getattr__
return getattr(self._wrapped, name)
AttributeError: 'Settings' object has no attribute 'STATICFILES_STORAGE'

This is because their is no default settings.py file within the staticfile app (as in v1.0.1).

Using staticfiles 1.0.1 and the collectstatic command works fine.