Re: eval if an object meets with a queryset.

2011-03-01 Thread Marc Aymerich
On Tue, Mar 1, 2011 at 2:07 PM, Marc Aymerich wrote: > On Tue, Mar 1, 2011 at 1:46 PM, Masklinn wrote: >> On 2011-03-01, at 13:18 , Marc Aymerich wrote: >>> >>> Hi Masklinn, I never use jquey's :( >> Not a problem. The .is method simply takes a CSS selector and returns a >> boolean flag indicati

Re: eval if an object meets with a queryset.

2011-03-01 Thread Marc Aymerich
On Tue, Mar 1, 2011 at 1:46 PM, Masklinn wrote: > On 2011-03-01, at 13:18 , Marc Aymerich wrote: >> >> Hi Masklinn, I never use jquey's :( > Not a problem. The .is method simply takes a CSS selector and returns a > boolean flag indicating whether the selected object(s) match the selector: > $('a

Re: eval if an object meets with a queryset.

2011-03-01 Thread Masklinn
On 2011-03-01, at 13:18 , Marc Aymerich wrote: > > Hi Masklinn, I never use jquey's :( Not a problem. The .is method simply takes a CSS selector and returns a boolean flag indicating whether the selected object(s) match the selector: $('a').is('a') is trivially going to return `true` for instanc

Re: eval if an object meets with a queryset.

2011-03-01 Thread Marc Aymerich
On Tue, Mar 1, 2011 at 12:19 PM, Masklinn wrote: > On 2011-03-01, at 12:11 , Marc Aymerich wrote: >> On Tue, Mar 1, 2011 at 12:02 PM, Daniel Hilton >> wrote: >>> On 1 March 2011 10:55, Marc Aymerich wrote: Hi!, I have a model class like this one: class Domain(models.Model):

Re: eval if an object meets with a queryset.

2011-03-01 Thread Masklinn
On 2011-03-01, at 12:11 , Marc Aymerich wrote: > On Tue, Mar 1, 2011 at 12:02 PM, Daniel Hilton > wrote: >> On 1 March 2011 10:55, Marc Aymerich wrote: >>> Hi!, >>> I have a model class like this one: >>> >>> class Domain(models.Model): >>>active = models.BooleanField() >>>root = models

Re: eval if an object meets with a queryset.

2011-03-01 Thread Marc Aymerich
On Tue, Mar 1, 2011 at 12:02 PM, Daniel Hilton wrote: > On 1 March 2011 10:55, Marc Aymerich wrote: >> Hi!, >> I have a model class like this one: >> >> class Domain(models.Model): >>    active = models.BooleanField() >>    root = models.CharField(max_length=6) >> >> now given a Domain instance I

Re: eval if an object meets with a queryset.

2011-03-01 Thread Marc Aymerich
On Tue, Mar 1, 2011 at 11:55 AM, Marc Aymerich wrote: > Hi!, > I have a model class like this one: > > class Domain(models.Model): >    active = models.BooleanField() >    root = models.CharField(max_length=6) > > now given a Domain instance I need to know if it meets with an > expresion like this

Re: eval if an object meets with a queryset.

2011-03-01 Thread Daniel Hilton
On 1 March 2011 10:55, Marc Aymerich wrote: > Hi!, > I have a model class like this one: > > class Domain(models.Model): >    active = models.BooleanField() >    root = models.CharField(max_length=6) > > now given a Domain instance I need to know if it meets with an > expresion like this one: > >

eval if an object meets with a queryset.

2011-03-01 Thread Marc Aymerich
Hi!, I have a model class like this one: class Domain(models.Model): active = models.BooleanField() root = models.CharField(max_length=6) now given a Domain instance I need to know if it meets with an expresion like this one: active=True and (root='com' or root='net') one way to do that