cms.plugins.teaser.models: 12 total statements, 0.0% covered

Generated: Wed 2013-03-13 10:33 CET

Source file: /media/Envs/Envs/filer-gallery/lib/python2.7/site-packages/cms/plugins/teaser/models.py

Stats: 0 executed, 7 missed, 5 excluded, 13 ignored

  1. from django.db import models
  2. from django.utils.translation import ugettext_lazy as _
  3. from cms.models import CMSPlugin, Page
  4. class Teaser(CMSPlugin):
  5. """
  6. A Teaser
  7. """
  8. title = models.CharField(_("title"), max_length=255)
  9. image = models.ImageField(_("image"), upload_to=CMSPlugin.get_media_path, blank=True, null=True)
  10. page_link = models.ForeignKey(
  11. Page,
  12. verbose_name=_("page"),
  13. help_text=_("If present image will be clickable"),
  14. blank=True,
  15. null=True,
  16. limit_choices_to={'publisher_is_draft': True}
  17. )
  18. url = models.CharField(_("link"), max_length=255, blank=True, null=True, help_text=_("If present image will be clickable."))
  19. description = models.TextField(_("description"), blank=True, null=True)
  20. def __unicode__(self):
  21. return self.title
  22. search_fields = ('description',)