AttributeError 'LegacyFallbackStorage' object has no attribute 'append'

Jeremy Kerr jk at ozlabs.org
Wed Dec 22 11:57:54 EST 2010


Hi Ross,

> The original issue occurs when I try to set a patch to RFC.
> 
> I am wondering if Django 1.2.3 is not the correct version to use.

I've tested with 1.2.3, so that should be fine.

> I did run all of the migration scripts in patchwork/lib/sql/migration.
> 
> Environment:
> 
> Request Method: POST
> Django Version: 1.2.3
> Python Version: 2.6.5
> Installed Applications:
> ['django.contrib.auth',
>  'django.contrib.contenttypes',
>  'django.contrib.sessions',
>  'django.contrib.sites',
>  'django.contrib.admin',
>  'patchwork',
>  'registration']
> Installed Middleware:
> ('django.middleware.common.CommonMiddleware',
>  'django.contrib.sessions.middleware.SessionMiddleware',
>  'django.middleware.csrf.CsrfViewMiddleware',
>  'django.contrib.auth.middleware.AuthenticationMiddleware',
>  'django.contrib.messages.middleware.MessageMiddleware')
> 
> 
> Traceback:
> File "/usr/lib/python2.6/site-packages/django/core/handlers/base.py" in
> get_response 100.                     response = callback(request,
> *callback_args, **callback_kwargs) File
> "/srv/patchwork/apps/patchwork/views/patch.py" in patch
>   86.                 context.add_message('Patch updated')
> File "/srv/patchwork/apps/patchwork/requestcontext.py" in add_message
>   86.         self['messages'].append(message)
> 
> Exception Type: AttributeError at /patch/1543/
> Exception Value: 'LegacyFallbackStorage' object has no attribute 'append'

OK, looks like the MessageMiddleware is providing its own 'messages' item 
here; try removing 'django.contrib.messages.middleware.MessageMiddleware' from 
the MIDDLEWARE_CLASSES setting, and let me know how you go.

Cheers,


Jeremy


More information about the Patchwork mailing list