django - retrieving objects from another model -


i have situation:

class item (models.model):     name = models.charfield(maxlenght=15)  class itemishired(models.model):     item = models.foreignkey(item)     ishirednow = models.booleanfield(null=false) 

the thing want retrieve items hired right now, if make query using itemishired.objects.filter(ishirednow=true) objects itemishired class when want objects item class related them.


Comments

Popular posts from this blog

cron - how to properly run Python script with crontab on every system startup -

elasticsearch - Is the order of operations guaranteed in a bulk update? -

Slow performance first queries on SQL Azure -