X-Git-Url: http://git.ithinksw.org/philo.git/blobdiff_plain/43a0fca55725921fd0748de90479ee2fa9cdbc6f..d619bfea3c16942826ae2df297f7e1660f63f8ac:/contrib/penfield/models.py?ds=inline diff --git a/contrib/penfield/models.py b/contrib/penfield/models.py index 555d9a2..c9c024c 100644 --- a/contrib/penfield/models.py +++ b/contrib/penfield/models.py @@ -1,6 +1,6 @@ from django.db import models from django.conf import settings -from philo.models import Tag, Titled, Entity, MultiView, Page, register_value_model +from philo.models import Tag, Titled, Entity, MultiView, Page, register_value_model, TemplateField from philo.exceptions import ViewCanNotProvideSubpath from django.conf.urls.defaults import url, patterns, include from django.core.urlresolvers import reverse @@ -10,8 +10,6 @@ from philo.utils import paginate from philo.contrib.penfield.validators import validate_pagination_count from django.utils.feedgenerator import Atom1Feed, Rss201rev2Feed from philo.contrib.penfield.utils import FeedMultiViewMixin -from philo.contrib.penfield.embed import * -from django.template import add_to_builtins as register_templatetags class Blog(Entity, Titled): @@ -259,8 +257,8 @@ class NewsletterArticle(Entity, Titled): newsletter = models.ForeignKey(Newsletter, related_name='articles') authors = models.ManyToManyField(getattr(settings, 'PHILO_PERSON_MODULE', 'auth.User'), related_name='newsletterarticles') date = models.DateTimeField(default=datetime.now) - lede = models.TextField(null=True, blank=True) - full_text = models.TextField() + lede = TemplateField(null=True, blank=True, verbose_name='Summary') + full_text = TemplateField() tags = models.ManyToManyField(Tag, related_name='newsletterarticles', blank=True, null=True) class Meta: @@ -440,7 +438,4 @@ class NewsletterView(MultiView, FeedMultiViewMixin): 'title': title } defaults.update(kwargs or {}) - return super(NewsletterView, self).get_feed(feed_type, extra_context, defaults) - - -register_templatetags('philo.contrib.penfield.templatetags.embed') \ No newline at end of file + return super(NewsletterView, self).get_feed(feed_type, extra_context, defaults) \ No newline at end of file