Test coverage report: markupmirror.feincms.models

# markupmirror.feincms.models: 18 total statements, 84.6% covered

Generated: Wed 2012-04-11 05:19 CDT

Source file: /home/buechler/Sites/django-markupmirror/markupmirror/feincms/models.py

Stats: 11 executed, 2 missed, 5 excluded, 24 ignored

1. `from django.db import models`
2. `from django.template.loader import render_to_string`
3. `from django.utils.translation import ugettext_lazy as _`
4. ``
5. `from markupmirror import settings`
6. `from markupmirror.fields import MarkupMirrorField`
7. ``
8. ``
9. `class MarkupMirrorContent(models.Model):`
10. `"""FeinCMS Page contenttype that stores markup in a MarkupMirrorField.`
11. ``
12. `"""`
13. `# TODO: find a way to include a button like richtext content`
14. `# __name__ = 'richtextcontent'`
15. ``
16. `feincms_item_editor_context_processors = (`
17. `lambda x: settings.FEINCMS_INIT_CONTEXT,`
18. `)`
19. `feincms_item_editor_includes = {`
20. `'head': [settings.FEINCMS_INIT_TEMPLATE],`
21. `}`
22. ``
23. `content = MarkupMirrorField(`
24. `verbose_name=_(u"Markup content"),`
25. `markup_type=settings.FEINCMS_MARKUP_TYPE,`
26. `blank=True)`
27. ``
28. `class Meta:`
29. `abstract = True`
30. `app_label = 'wienfluss'`
31. `verbose_name = _(u"Markup content")`
32. `verbose_name_plural = _(u"Markup content")`
33. ``
34. `def render(self, **kwargs):`
35. `request = kwargs.get('request')`
36. `return render_to_string('content/markupmirror/default.html', {`
37. `'content': self,`
38. `'request': request`
39. `})`
40. ``
41. ``
42. `__all__ = ('MarkupMirrorContent',)`