Re: selected ModelMultipleChoiceField

2008-12-09 Thread Abdel Bolanos Martinez
That's rigth you hit the point followed your advice and with these lines i resolved my problem, got modelform filtered by a custom query yaho the model (part of it) class Indicacion(models.Model): ''' @author: Abel Bolaños Martínez @contact: [EMAIL

Re: selected ModelMultipleChoiceField

2008-12-08 Thread Håkan Waara
Yes, that's what my reply to you was about. The below examples work for ModelChoiceField, you only need to use the same technique on a ModelMultipleChoiceField, where I - like I wrote - guess you can use a tuple of initial values, e.g. ("foo", "bar"). /Håkan 8 dec 2008 kl. 18.30 skrev

Re: selected ModelMultipleChoiceField

2008-12-08 Thread Abdel Bolanos Martinez
what I want is use ModelMultipleChoiceField with a queryset but I need that some of the of the generated be mareked as

Re: selected ModelMultipleChoiceField

2008-12-08 Thread Håkan Waara
If you want to set it to always the same values, you can use the "initial" argument on your form field. Pseudo-example (haven't run the code, but it illustrates the solution): class MyForm(forms.Form): end = forms.DateField(label="Until", required=False, initial="2009-11-12") If you

selected ModelMultipleChoiceField

2008-12-08 Thread Abdel Bolanos Martinez
Hi, i'm new in django and i'm using ModelMultipleChoiceField and all works fine but i need to 'mark' o 'selected' some model objects from the queryset have ever someone did something like that??? Abdel Bolaños Martínez Ing. Infórmatico Telf. 266-8562 5to piso, oficina 526, Edificio Beijing,