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

many to many - Django Rest Framework ManyToMany filter multiple values -

java - Jasper subreport showing only one entry from the JSON data source when embedded in the Title band -

Java Entity Manager - JSON reader was expecting a value but found 'db' -