diff gpp/news/admin.py @ 486:7854d75427af

For #233, add a meta description field for news stories. This field will get put in the open graph meta tag for better descriptions when shared on social media sites.
author Brian Neal <bgneal@gmail.com>
date Tue, 18 Oct 2011 23:23:42 +0000
parents 53fdaf0da539
children
line wrap: on
line diff
--- a/gpp/news/admin.py	Tue Oct 18 00:14:34 2011 +0000
+++ b/gpp/news/admin.py	Tue Oct 18 23:23:42 2011 +0000
@@ -37,7 +37,8 @@
                     allow_comments=pending_story.allow_comments,
                     tags=pending_story.tags,
                     front_page_expiration=pending_story.front_page_expiration,
-                    priority=pending_story.priority)
+                    priority=pending_story.priority,
+                    meta_description=pending_story.meta_description)
             story.save()
             pending_story.delete()
 
@@ -48,7 +49,7 @@
     approve_story.short_description = "Approve selected pending stories"
 
     class Media:
-        js = settings.GPP_THIRD_PARTY_JS['tiny_mce']
+        js = ['js/news_admin.js'] + settings.GPP_THIRD_PARTY_JS['tiny_mce']
 
 
 class StoryAdmin(admin.ModelAdmin):
@@ -60,7 +61,7 @@
     raw_id_fields = ('submitter', )
 
     class Media:
-        js = settings.GPP_THIRD_PARTY_JS['tiny_mce']
+        js = ['js/news_admin.js'] + settings.GPP_THIRD_PARTY_JS['tiny_mce']
 
 
 admin.site.register(Category, CategoryAdmin)