私の会議モデルはここにあります
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は会議テーブルの属性であるため、このエラーを表示する理由はありません。
私が間違っているかもしれないことを私に助けてください?