型号:
class Person(models.Model):
name = ....
class Registration(models.Model):
person = models.ForeignKey(person)
expires = models.DateField()
每年都有一个新的登记记录。
现在我想找出所有登记过期或从未登记的人。有点像
Person.objects.filter(registration__expires__lte=date.today() )
当然,在针对person的查询中不能使用“注册”。
是否需要将最新的注册日期存储在pers
我有一个包含用户响应的JSON ():
var surveyJSON = {pages:[{name:"page1",elements:[{type:"rating",name:"How confident are you conducting market analysis?",description:"5 - most confident"},{type:"rating",name:"How confident are you evaluating the feasibility of a new op
我有四个型号
class Company < ActiveRecord::Base
has_many :share_types
belongs_to :user
end
class ShareType < ActiveRecord::Base
has_many :shares
belongs_to :company
end
class Share < ActiveRecord::Base
belongs_to :user
belongs_to :share_type
end
class User < ActiveRecord:Base
has_