Skip to content


Subversion checkout URL

You can clone with
Download ZIP


duplicate pages in the teaser plugin #343

yml opened this Issue · 3 comments

3 participants

yml commented

After a fruitful discussion on #django-cms with stefanfoulis and ojii we come to the conclusion that the pages are not exactly duplicated but in fact the pages is shown in its 2 states published and draft.

So this duplication can be solved in at least 2 different ways : by restricting the selection to the published Pages :

diff --git a/cms/plugins/teaser/ b/cms/plugins/teaser/
index c99150d..6bd7807 100644
--- a/cms/plugins/teaser/
+++ b/cms/plugins/teaser/
@@ -10,7 +10,10 @@ class Teaser(CMSPlugin):
title = models.CharField(("title"), max_length=255)
image = models.ImageField(
("image"), upload_to=CMSPlugin.get_media_path, bla

  • page_link = models.ForeignKey(Page, verbose_name=("page"), help_text=("If p
  • page_link = models.ForeignKey(Page,
  • limit_choices_to={'publisher_is_draft':True}, #Not clear why this need to be true
  • verbose_name=_("page"),
  • help_text=("If present image will be clickable url = models.CharField(("link"), max_length=255, blank=True, null=True, help description = models.TextField(_("description"), blank=True, null=True) ------------8<--------------------------------

or by changing the unicode method to display the state of the Page this will avoid some confusion.



here's the diff a bit more readable:

Me and stefan have look at this together with yml yesterday.

yml commented

Your proposal is sligtly different than mine, I am suggesting :

  • limit_choices_to={'publisher_is_draft':True},

I don't know why True is the "good" value because it seems a bit anti natural but I have observed that with False the hyperlink to the page does not get displayed on the published page.


closed by 88701f4, teaser links only draft pages

@christianbertschy christianbertschy referenced this issue from a commit in christianbertschy/django-cms-2.0
@digi604 digi604 fixes #343, teaser links only draft pages 88701f4
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.