1 from django.db import models
2 from django.utils.translation import ugettext_lazy as _
5 class Chunk(models.Model):
7 A Chunk is a piece of content associated
8 with a unique key that can be inserted into
9 any template with the use of a special template
12 key = models.CharField(_('key'), help_text=_('A unique name for this chunk of content'), primary_key=True, max_length=255)
13 content = models.TextField(_('content'), blank=True)
17 verbose_name = _('chunk')
18 verbose_name_plural = _('chunks')
20 def __unicode__(self):
21 return u'%s' % (self.key,)