Re: widget construction issue

2012-08-27 Thread Nicolas Emiliani
On Mon, Aug 27, 2012 at 3:54 AM, Melvyn Sopacua wrote: > On 27-8-2012 1:21, Nicolas Emiliani wrote: > > > The thing is that the GridWidget.__init__ method does not get executed > > each time I access the form that contains it, so if the queryset changes > the > > widget

Re: widget construction issue

2012-08-27 Thread Melvyn Sopacua
On 27-8-2012 1:21, Nicolas Emiliani wrote: > The thing is that the GridWidget.__init__ method does not get executed > each time I access the form that contains it, so if the queryset changes the > widget gets 'obsolete'. That's because the widget is merely the piece that get rendered. It's

widget construction issue

2012-08-26 Thread Nicolas Emiliani
Hi, I built a widget class that inherits form MultiWidget and it looks like this : class GridWidget(forms.MultiWidget): def __init__(self, attrs=None, queryset=None): self.queryset = queryset _widgets = [] for record in self.queryset: . do