Slight changes to penfield NewsletterIssueAdmin & added newsletter value models
authormelinath <stephen.r.burrows@gmail.com>
Wed, 14 Jul 2010 15:08:21 +0000 (11:08 -0400)
committermelinath <stephen.r.burrows@gmail.com>
Thu, 15 Jul 2010 15:33:48 +0000 (11:33 -0400)
contrib/penfield/admin.py
contrib/penfield/models.py

index ba885fd..56edd45 100644 (file)
@@ -29,7 +29,7 @@ class NewsletterArticleAdmin(TitledAdmin):
 
 
 class NewsletterIssueAdmin(TitledAdmin):
 
 
 class NewsletterIssueAdmin(TitledAdmin):
-       pass
+       filter_horizontal = TitledAdmin.filter_horizontal + ('articles',)
 
 
 class NewsletterViewAdmin(EntityAdmin):
 
 
 class NewsletterViewAdmin(EntityAdmin):
index 0e5bce0..eede5a4 100644 (file)
@@ -203,6 +203,9 @@ class Newsletter(Entity, Titled):
        pass
 
 
        pass
 
 
+register_value_model(Newsletter)
+
+
 class NewsletterArticle(Entity, Titled):
        newsletter = models.ForeignKey(Newsletter, related_name='articles')
        authors = models.ManyToManyField(getattr(settings, 'PHILO_PERSON_MODULE', 'auth.User'), related_name='newsletterarticles')
 class NewsletterArticle(Entity, Titled):
        newsletter = models.ForeignKey(Newsletter, related_name='articles')
        authors = models.ManyToManyField(getattr(settings, 'PHILO_PERSON_MODULE', 'auth.User'), related_name='newsletterarticles')
@@ -228,6 +231,9 @@ class NewsletterIssue(Entity, Titled):
                unique_together = (('newsletter', 'number'),)
 
 
                unique_together = (('newsletter', 'number'),)
 
 
+register_value_model(NewsletterIssue)
+
+
 class NewsletterView(MultiView):
        ARTICLE_PERMALINK_STYLE_CHOICES = (
                ('D', 'Year, month, and day'),
 class NewsletterView(MultiView):
        ARTICLE_PERMALINK_STYLE_CHOICES = (
                ('D', 'Year, month, and day'),