On Tue, Apr 28, 2009 at 12:28 PM, equalium <equal...@gmail.com> wrote:
> > Hello, I'm new to django. I want to retrieve a record of Customers > with a non empty serial field. > I try with: > Customer.objects.filter(serial<>'') > but I get an error saying that serial is not defined. > > Thank you for any help. > > > > > You want to use the exclude option to remove any items that match a given criteria so: Customer.objects.exclude(serial='') Alex -- "I disapprove of what you say, but I will defend to the death your right to say it." --Voltaire "The people's good is the highest law."--Cicero --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@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 -~----------~----~----~----~------~----~------~--~---