From 3b1d871f1c800bac4d1a9ce85ee2eb5c5c19a4f0 Mon Sep 17 00:00:00 2001 From: melinath Date: Wed, 14 Jul 2010 11:08:21 -0400 Subject: [PATCH 1/1] Slight changes to penfield NewsletterIssueAdmin & added newsletter value models --- contrib/penfield/admin.py | 2 +- contrib/penfield/models.py | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/contrib/penfield/admin.py b/contrib/penfield/admin.py index ba885fd..56edd45 100644 --- a/contrib/penfield/admin.py +++ b/contrib/penfield/admin.py @@ -29,7 +29,7 @@ class NewsletterArticleAdmin(TitledAdmin): class NewsletterIssueAdmin(TitledAdmin): - pass + filter_horizontal = TitledAdmin.filter_horizontal + ('articles',) class NewsletterViewAdmin(EntityAdmin): diff --git a/contrib/penfield/models.py b/contrib/penfield/models.py index 0e5bce0..eede5a4 100644 --- a/contrib/penfield/models.py +++ b/contrib/penfield/models.py @@ -203,6 +203,9 @@ class Newsletter(Entity, Titled): 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') @@ -228,6 +231,9 @@ class NewsletterIssue(Entity, Titled): unique_together = (('newsletter', 'number'),) +register_value_model(NewsletterIssue) + + class NewsletterView(MultiView): ARTICLE_PERMALINK_STYLE_CHOICES = ( ('D', 'Year, month, and day'), -- 2.20.1