I have difficulties using field lookups on foreign keys. I'm trying to
retrieve a list of items with a specific state using the following
model:

class State(meta.Model):
  state = meta.CharField(maxlength = 12, primary_key = True)

class Item(meta.Model):
  wdate = meta.DateField()
  state = meta.ForeignKey(State)

% python
>>> from django.models.ttime import *
>>> items.get_list(state__id__in = ['Open'])
[snip]
TypeError: got unexpected keyword argument 'state__id__in'

I've read the "Field lookups" section of the "Database API reference",
and my understanding is that the field key should be available. I've
also tried "state__in", "state_id__in".

Anyone have a clue?
/LarS

Reply via email to