comparison gpp/bio/admin.py @ 398:701730b2fcda

Fixing #196; add status messages in the admin after approving news and links.
author Brian Neal <bgneal@gmail.com>
date Sat, 26 Mar 2011 00:26:00 +0000
parents 9d470c7a2b93
children 98b373ca09f3
comparison
equal deleted inserted replaced
397:accfc1fdb88d 398:701730b2fcda
54 profile.user.save() 54 profile.user.save()
55 profile.status = status 55 profile.status = status
56 profile.status_date = now 56 profile.status_date = now
57 profile.save() 57 profile.save()
58 58
59 count = qs.count() 59 count = len(qs)
60 msg = "1 user" if count == 1 else "%d users" % count 60 msg = "1 user" if count == 1 else "%d users" % count
61 self.message_user(request, "%s successfully marked as %s." % (msg, 61 self.message_user(request, "%s successfully marked as %s." % (msg,
62 bio.models.USER_STATUS_CHOICES[status][1])) 62 bio.models.USER_STATUS_CHOICES[status][1]))
63 63
64 def mark_active(self, request, qs): 64 def mark_active(self, request, qs):