This happens to me as well (also with 1.2.1). Seems like a bug with _queryset vs queryset on BaseModelFormSet.
Maybe you could submit a ticket to http://code.djangoproject.com/query Nuno On Tue, Aug 10, 2010 at 9:21 PM, refreegrata <refreegr...@yahoo.com> wrote: > Hello list. I have a problem. I'm a newbie in Django using his first > formset. > > I have this: > ------------------------------------------------------------------------ > class BaseFormFormato_habilitar(BaseModelFormSet): > def __init__(self, *args, **kwargs): > super(BaseFormFormato_habilitar, self).__init__(*args, > **kwargs) > self.queryset = Formato.objects.filter(actividad=True) > > FormFormato_habilitar = modelformset_factory(Formato, max_num=0, > formset=BaseFormFormato_habilitar) > ------------------------------------------------------------------------ > > I want a formset with forms filtered for > "Formato.objects.filter(actividad=True)", however, the formset always > returns all the rows in the table. My alternatively subclass > "BaseFormFormato_habilitar" don't works. What am I doing wrong? > the problem is solved if i do "FormFormato_habilitar(queryset = > Formato.objects.filter(actividad=True))" in a view, but i prefer solve > the problem with a subclass in the "forms.py". > > thanks for read, and sorry for my poor english > > P.D.: I use Django 1.2.1 > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send email to django-us...@googlegroups.com. > To unsubscribe from this group, send email to > django-users+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.