コード例 #1
0
ファイル: old_tests.py プロジェクト: roycohen2013/TheSquad
 def test_AllActivrProfileNotifs(self):
     """
     THIS NEEDS TO BE MODIFIED FOR RESPONSE NOTIFICATIONS
     """
     self.assertIn(
         self.genInfoNotif,
         notifUtils.getAllActiveProfileNotifs(
             profUtils.getProfileFromUsername("TaikhoomAttar")))
コード例 #2
0
ファイル: content.py プロジェクト: roycohen2013/TheSquad
def getNotifications(request):#returns a dict with the userProfile and notifs values filled
	if request.user.is_anonymous():#anon no notis
		return None
	userProfile = profileUtil.getProfileFromUser(request.user)
	notifs = notifUtil.getAllActiveProfileNotifs(userProfile)
	context = {}
	context['currentUserProfile'] = userProfile
	context['notifs'] = notifs
	return context
コード例 #3
0
ファイル: content.py プロジェクト: roycohen2013/TheSquad
def getNotifications(
        request
):  #returns a dict with the userProfile and notifs values filled
    if request.user.is_anonymous():  #anon no notis
        return None
    userProfile = profileUtil.getProfileFromUser(request.user)
    notifs = notifUtil.getAllActiveProfileNotifs(userProfile)
    context = {}
    context['currentUserProfile'] = userProfile
    context['notifs'] = notifs
    return context
コード例 #4
0
ファイル: old_tests.py プロジェクト: roycohen2013/TheSquad
 def test_AllActivrProfileNotifs (self):
     """
     THIS NEEDS TO BE MODIFIED FOR RESPONSE NOTIFICATIONS
     """
     self.assertIn (self.genInfoNotif, notifUtils.getAllActiveProfileNotifs (profUtils.getProfileFromUsername ("TaikhoomAttar")))