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

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

serialization - Convert Any type in scala to Array[Byte] and back -

SonarQube Plugin for Jenkins does not find SonarQube Scanner executable -