Changes between Version 3 and Version 4 of UsingMarkup


Ignore:
Timestamp:
12/03/2005 08:16:21 PM (10 years ago)
Author:
ubernostrum
Comment:

Forgot to add the 'null=True' in the sample model

Legend:

Unmodified
Added
Removed
Modified
  • UsingMarkup

    v3 v4  
    88#!python
    99
    10 import markdown
    11 
    1210class Entry(meta.Model):
    1311    title = meta.CharField('Title', maxlength=250)
    1412    pub_date = meta.DateTimeField('Date published', default=meta.LazyDate())
    1513    body = meta.TextField('Entry body', help_text='Use Markdown syntax.')
    16     body_markdown = meta.TextField('Entry body as HTML', blank=True)
     14    body_markdown = meta.TextField('Entry body as HTML', blank=True, null=True)
    1715
    1816    class META:
     
    2422
    2523    def _pre_save(self):
     24        import markdown
    2625        self.body_markdown = markdown.markdown(self.body)
    2726}}}
Back to Top