Exemplo n.º 1
0
def create(request, user, badge):
    "Creates an award"
    sender = models.User.objects.get(pk=1)
    award = models.Award.objects.create(user=user, badge=badge)
    text = notegen.awardnote(award.badge)
    note = models.Note.objects.create(sender=sender, target=user, content=text, url=award.badge.get_absolute_url() )
    messages.info(request, note.html)
Exemplo n.º 2
0
def create(request, user, badge):
    award = models.Award.objects.create(user=user, badge=badge)
    text = notegen.awardnote(award.badge)
    note = models.Note.objects.create(sender=user,
                                      target=user,
                                      content=text,
                                      url=award.badge.get_absolute_url())
    messages.info(request, note.html)
Exemplo n.º 3
0
def notify(user, award):
    text = notegen.awardnote(award.badge)
    note = models.Note.objects.create(sender=user, target=user, content=text)
Exemplo n.º 4
0
def notify(user, award):
    text = notegen.awardnote(award.badge)
    note = models.Note.objects.create(sender=user, target=user, content=text)