I\'ve run into a strange problem where data seems to persist accross different views and requests until the server gets restarted.
I\'ve managed to reduce the issue to t
Because you're mutating the kwargs that are passed in, which come from class-level properties in the view class.
Instead, copy them and update the copy:
initial_defaults = {'bug': 'no'}
initial_defaults.update(kwargs.get('initial', {}))
defaults = kwargs.copy()
defaults['initial'] = initial_defaults
You might want to specify Django-1.3 development, generic class view doesn't exist in Django 1.2.5. In your forms.py
file, can you comment the following lines and try again:
class UpdateForm(forms.ModelForm):
class Meta:
model = Foo
def __init__(self, *args, **kwargs):
#kwargs.setdefault('initial', {})
#kwargs['initial'].update({'bug': 'WHY??'})
super(UpdateForm, self).__init__(*args, **kwargs)