From: melinath Date: Wed, 14 Jul 2010 15:08:21 +0000 (-0400) Subject: Slight changes to penfield NewsletterIssueAdmin & added newsletter value models X-Git-Tag: philo-0.9~46^2~1 X-Git-Url: http://git.ithinksw.org/philo.git/commitdiff_plain/3b1d871f1c800bac4d1a9ce85ee2eb5c5c19a4f0?hp=bcaf02b09b921364261bd186781f3ff1593fbee0 Slight changes to penfield NewsletterIssueAdmin & added newsletter value models --- 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'),