我的会议模型在这里
class Meeting(models.Model):
name = models.CharField(max_length=200)
meetingID = models.CharField(max_length = 50)
venue = models.ForeignKey('MeetingRoom',related_name ='meetingroom',null = True,blank = True) # whether One Time or Recurring
status =models.IntegerField(null=True, blank=True)
recurring_time = models.CharField(max_length=50) # (Recurring date schedule information)
attendee_passwd = models.CharField(max_length=100)
moderator_passwd = models.CharField(max_length = 100)
date_created = models.DateTimeField(auto_now=True) # it should be auto fill
meeting_datetime = models.DateTimeField(default=datetime.datetime.now,blank=True, null=True)
timezone = models.CharField(max_length = 50)
reminder = models.BooleanField()
start_time = models.CharField(max_length=100)
end_time = models.CharField(max_length=100)
meeting_duration = models.CharField(max_length=100)
duration = models.CharField(max_length=20)
created_by = models.ForeignKey('User',related_name ='meetingroom_created')
sms_no = models.IntegerField() #participant will call on this number Unique for all users and participant
conferenceID = models.IntegerField(blank=True, null=True)
meeting_logout_url = models.CharField(max_length=100)
max_participants = models.IntegerField(blank=True, null=True)
participants = models.ForeignKey('Participant',related_name = 'parts_of_meetingroom',null = True)
def disable_from_meeting(self):
try:
get_participant = Participant.objects.filter(meeting_id =self.id)
for get_pp in get_participant:
get_pp.status = 0
get_pp.save()
except:
LOG_INFO('Organization %s has no PARTICIPANT IN %Ssuser ', self.id)
pass
class Meta:
app_label = 'testsite'
现在在我看来,当我试图将 start_time 存储在字典中时
get_all_user_of_org = User.objects.filter(org_name =get_org)
for user_id in get_all_user_of_org:
mee_data = {}
get_meetings = Meeting.objects.filter(created_by = user_id.id)
print dir(get_meetings)
mee_data['start_time'] = get_meetings.start_time
# mee_data['end_time'] = get_meetings
getall.append(mee_data)
那我为什么要得到
AttributeError: 'QuerySet' object has no attribute 'start_time'
这里没有理由显示此错误,因为 start_time 是我的会议表的属性
请帮帮我我会做错什么?