Mercurial > public > sg101
diff gpp/bio/views.py @ 178:d51743322bb2
#56 - Cut over to Django 1.2 messaging system.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Wed, 17 Mar 2010 03:12:05 +0000 |
parents | ab7830b067b3 |
children | b4305e18d3af |
line wrap: on
line diff
--- a/gpp/bio/views.py Mon Mar 15 03:26:38 2010 +0000 +++ b/gpp/bio/views.py Wed Mar 17 03:12:05 2010 +0000 @@ -6,6 +6,7 @@ from django.shortcuts import get_object_or_404 from django.template import RequestContext from django.contrib import auth +from django.contrib import messages from django.http import HttpResponse from django.http import HttpResponseBadRequest from django.http import HttpResponseRedirect @@ -142,7 +143,7 @@ profile.avatar.save(form.get_filename(), file, save=False) profile.save() - request.user.message_set.create(message='Avatar updated.') + messages.success(request, 'Avatar updated') return HttpResponseRedirect(reverse('bio-me')) else: form = UploadAvatarForm()