Revision c6fdba44 cloudcms/content.py

b/cloudcms/content.py
196 196
        return render_to_string(['content/intro_images.html'], {'content': self})
197 197

  
198 198

  
199
class TextileContent(models.Model):
200
    content = models.TextField()
201

  
202
    class Meta:
203
        abstract = True
204

  
205
    def render(self, **kwargs):
206
        return textile(self.content)
207
    
208
class IntroBlock(models.Model):
209
    title = models.CharField(_('title'), max_length=200, blank=False)
210
    content = models.TextField()
211
    class_name = models.CharField(_('class_name'), max_length=200, blank=True, null=True)
212
    image = MediaFileForeignKey(MediaFile, blank=True, null=True)
213

  
214
    class Meta:
215
        abstract = True
216

  
217
    def render(self, **kwargs):
218
        return render_to_string(['content/intro_block.html'], {'content': self})
219
    

Also available in: Unified diff