Mercurial > public > sg101
comparison gpp/news/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 | 7c7201f942fe |
children | 53fdaf0da539 |
comparison
equal
deleted
inserted
replaced
397:accfc1fdb88d | 398:701730b2fcda |
---|---|
38 tags=pending_story.tags, | 38 tags=pending_story.tags, |
39 front_page_expiration=pending_story.front_page_expiration) | 39 front_page_expiration=pending_story.front_page_expiration) |
40 story.save() | 40 story.save() |
41 pending_story.delete() | 41 pending_story.delete() |
42 | 42 |
43 count = len(qs) | |
44 msg = "1 story" if count == 1 else "%d stories" % count | |
45 self.message_user(request, "%s approved." % msg) | |
46 | |
43 approve_story.short_description = "Approve selected pending stories" | 47 approve_story.short_description = "Approve selected pending stories" |
44 | 48 |
45 class Media: | 49 class Media: |
46 js = settings.GPP_THIRD_PARTY_JS['tiny_mce'] | 50 js = settings.GPP_THIRD_PARTY_JS['tiny_mce'] |
47 | 51 |