示例#1
0
def get_future_meeting(start,end,empty_msg):
    return {
	'meetings':Meeting.objects.filter(
            when__gte=datetime.datetime.now()-settings.LATE_ARRIVAL_OFFSET
            ).order_by('when')[start:end],
	'empty_msg':empty_msg,
        'user': get_current_user()
    }
示例#2
0
def get_future_meeting(start, end, empty_msg):
    return {
        'meetings':
        Meeting.objects.filter(
            when__gte=datetime.datetime.now() -
            settings.LATE_ARRIVAL_OFFSET).order_by('when')[start:end],
        'empty_msg':
        empty_msg,
        'user':
        get_current_user()
    }
示例#3
0
def get_all_past_meetings(empty_msg):
    return {
	'meetings':Meeting.objects.filter(when__lte=datetime.datetime.now() ), 
	'empty_msg':empty_msg,
        'user': get_current_user()
    }
示例#4
0
def get_meeting(start,end,empty_msg):
    return {
	'meetings':Meeting.objects.all().order_by('when')[start:end],
	'empty_msg':empty_msg,
        'user': get_current_user()
    }
示例#5
0
def get_all_past_meetings(empty_msg):
    return {
        'meetings': Meeting.objects.filter(when__lte=datetime.datetime.now()),
        'empty_msg': empty_msg,
        'user': get_current_user()
    }
示例#6
0
def get_meeting(start, end, empty_msg):
    return {
        'meetings': Meeting.objects.all().order_by('when')[start:end],
        'empty_msg': empty_msg,
        'user': get_current_user()
    }
示例#7
0
文件: models.py 项目: mnewsome/Chipy
 def rsvp_user_maybe(self):
     return self.meetingrsvp_set.filter(user=get_current_user(),
                                        rsvp='maybe').count() != 0
示例#8
0
文件: models.py 项目: mnewsome/Chipy
 def rsvp_user_yes(self):
     return self.meetingrsvp_set.filter(user=get_current_user(),
                                        rsvp='yes').count() != 0
示例#9
0
文件: models.py 项目: brianray/Chipy
 def rsvp_user_maybe(self):
 	return self.meetingrsvp_set.filter(user=get_current_user(),rsvp='maybe').count() != 0
示例#10
0
文件: models.py 项目: brianray/Chipy
 def rsvp_user_yes(self):
 	return self.meetingrsvp_set.filter(user=get_current_user(),rsvp='yes').count() != 0