On Wed, Nov 18, 2009 at 2:15 AM, Radhikavk <radhi3...@gmail.com> wrote:

>
> in one query they have giver or conditions
> but i need
> i wil have one common query like
> list=rooms.objects.all()  # this is common query i m using
>
> and if the condition given like room status,type etc then i need to append
> those where conditions to the common query
> if room_type
>      append where room_type=this
> else
>     nothing
>
> i have so many search criteria , i think this appending is useful but it is
> giving error queryset has no attribute append
>

Certainly it is useful, but in the Django ORM it is not done by calling a
method named append.  It is done by chaining filter calls.  Please read:

http://docs.djangoproject.com/en/dev/topics/db/queries/#id1

Karen

--

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=.


Reply via email to