Hi all,
I am trying to enable markup app in django and added 'django.contrib.markup' to INSTALLED APPS and in my model i import it as "import markdown".. but when i go to db and try to add something, i always get importerror. i guess iit must be about app installation issue or am i missing something?
this is how i do it in models.py:
class Entry(...)
title = models.CharField(verbose_name="Title", max_length=255)
slug = models.SlugField(verbose_name="Slug")
content_markdown = models.TextField(verbose_name="Markdown Content",
help_text="Use Markdown syntax here.")
content = models.TextField(verbose_name="Page content as HTML",
help_text="You don't have to touch here.",
blank=True, null=True)
date = models.DateTimeField(verbose_name="Date Published")
author = models.ForeignKey(User, verbose_name="Author")
def save(self):
import markdown
self.content = markdown.markdown(self.content_markdown)
super(Page, self).save()
great thanks in advance..