diff options
author | luxagraf <sng@luxagraf.net> | 2015-11-20 14:21:49 -0500 |
---|---|---|
committer | luxagraf <sng@luxagraf.net> | 2015-11-20 14:21:49 -0500 |
commit | 9412a3793b298daa14179c4f3789fe3ffc46ecba (patch) | |
tree | 68b439a9174522ed96e9262a209032cfd6e11016 /app/pages/models.py | |
parent | 1167d8086a826a4896cdcb5b36e78eeb1e6e8fb0 (diff) |
About halfway through adding income by month section to admin.
Diffstat (limited to 'app/pages/models.py')
-rw-r--r-- | app/pages/models.py | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/app/pages/models.py b/app/pages/models.py index 832b958..0062bd9 100644 --- a/app/pages/models.py +++ b/app/pages/models.py @@ -1,15 +1,6 @@ from django.db import models from django.contrib.sitemaps import Sitemap -import markdown -from mdx_attr_list.mdx_attr_list import AttrListExtension -def markdown_processor(txt): - md = markdown.Markdown( - extensions=[AttrListExtension(),'footnotes',], - output_format='html5', - safe_mode=False - ) - return md.convert(txt) class Page(models.Model): title = models.CharField(max_length=200) @@ -17,6 +8,7 @@ class Page(models.Model): body_html = models.TextField(blank=True) body_markdown = models.TextField() meta_description = models.CharField(max_length=256, null=True, blank=True) + #path = models.CharField(max_length=200, null=True, blank=True) def __unicode__(self): return self.title @@ -25,7 +17,7 @@ class Page(models.Model): return "/%s/" % (self.slug) def save(self): - #run markdown + # run markdown self.body_html = markdown_processor(self.body_markdown) super(Page, self).save() |