comparison gpp/bio/admin.py @ 562:98b373ca09f3

For bitbucket issue #3, ensure that changes to Profile, Post & Topic models via the admin cause the search index to be updated.
author Brian Neal <bgneal@gmail.com>
date Wed, 08 Feb 2012 18:58:57 -0600
parents 701730b2fcda
children 93f049a241ff
comparison
equal deleted inserted replaced
561:8f3b7f0d4d13 562:98b373ca09f3
52 profile.user.is_active = (status == bio.models.STA_ACTIVE or 52 profile.user.is_active = (status == bio.models.STA_ACTIVE or
53 status == bio.models.STA_STRANGER) 53 status == bio.models.STA_STRANGER)
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(content_update=False)
58 58
59 count = len(qs) 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]))