Пример #1
0
def notify_followers_new_content(course):
    followers = UserProfile.query(UserProfile.followed_courses == course)
    for follower in followers:
        notify = Notification(text='Novo conteúdo adicionado %s' %(course.get().title), 
            profile=follower.key, 
            ntype='icon-warning-sign'
        )
        notify.put()
Пример #2
0
def notify_follow(course, user):
    notify = Notification(text='%s começou a seguir o curso %s' %(user.full_name, course.title), 
        profile=course.owner, 
        ntype='icon-warning-sign'
    )
    notify.put()
Пример #3
0
	def add_notification(self):
		notify = Notification(text=self.request.get('text'), profile=self.logged.key, ntype='icon-comment')
		notify.put()

		return self.render_json({'success': True})