cms.plugins.link.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/link/models.py

Stats: 0 executed, 7 missed, 5 excluded, 12 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 Link(CMSPlugin):
  5. """
  6. A link to an other page or to an external website
  7. """
  8. name = models.CharField(_("name"), max_length=256)
  9. url = models.URLField(_("link"), verify_exists=False, blank=True, null=True)
  10. page_link = models.ForeignKey(Page, verbose_name=_("page"), blank=True, null=True, help_text=_("A link to a page has priority over a text link."))
  11. mailto = models.EmailField(_("mailto"), blank=True, null=True, help_text=_("An email adress has priority over a text link."))
  12. target = models.CharField(_("target"), blank=True, max_length=100, choices=((
  13. ("", _("same window")),
  14. ("_blank", _("new window")),
  15. ("_parent", _("parent window")),
  16. ("_top", _("topmost frame")),
  17. )))
  18. def __unicode__(self):
  19. return self.name
  20. search_fields = ('name',)