Changes between Version 6 and Version 7 of UsingMarkup


Ignore:
Timestamp:
12/06/2006 04:20:12 PM (9 years ago)
Author:
anonymous
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • UsingMarkup

    v6 v7  
    88#!python
    99
    10 class Entry(meta.Model):
    11     title = meta.CharField('Title', maxlength=250)
    12     pub_date = meta.DateTimeField('Date published', default=meta.LazyDate())
    13     body = meta.TextField('Entry body', help_text='Use Markdown syntax.')
    14     body_markdown = meta.TextField('Entry body as HTML', blank=True, null=True)
     10class Entry(models.Model):
     11    title = .CharField('Title', maxlength=250)
     12    pub_date = models.DateTimeField('Date published', default=meta.LazyDate())
     13    body_markdown = models.TextField('Entry body', help_text='Use Markdown syntax.')
     14    body_html = models.TextField('Entry body as HTML', blank=True, null=True)
    1515
    1616    class META:
     
    2323    def save(self):
    2424        import markdown
    25         self.body_markdown = markdown.markdown(self.body)
     25        self.body_html = markdown.markdown(self.body_markdown)
    2626        super(Entry, self).save() # Call the "real" save() method.
    2727}}}
Back to Top