AttributeError 'LegacyFallbackStorage' object has no attribute 'append'

Ross Brattain ross.b.brattain at intel.com
Thu Dec 23 06:06:19 EST 2010


On Tue, 21 Dec 2010 16:57:54 -0800
Jeremy Kerr <jk at ozlabs.org> wrote:

> 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.
> 

This seems to have fixed the issue.  It was probably user-error when I first edited the settings.py, sorry for all the bother.

Thanks so much for your help.

--
Ross



More information about the Patchwork mailing list