Thank you very much. I missed that part in the documentation

On Fri, Jun 25, 2010 at 4:54 PM, Oleg Lomaka <oleg.lom...@gmail.com> wrote:

>  On 6/25/10 8:25 AM, Tran Cao Thai wrote:
>
>> is there any way to use the ModelChoiceField without any value in it? I
>> tried to set query = None but it gave an error while rendering the html page
>>
>
> Use EmptyQuerySet.
> field = ModelChoiceField(queryset=YouMode.objects.none())
>
> http://docs.djangoproject.com/en/1.2/ref/models/querysets/#none
>
> --
> 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<django-users%2bunsubscr...@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.

Reply via email to