Skip to content

Commit

Permalink
add markdown filter support
Browse files Browse the repository at this point in the history
  • Loading branch information
2shortplanks committed Jun 12, 2009
1 parent 76bdb70 commit 748fcb2
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 0 deletions.
Empty file added markdownfilter/__init__.py
Empty file.
7 changes: 7 additions & 0 deletions markdownfilter/jinjaglobals.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
from chouwa.decorators import jinjaglobal, jinjafilter

import markdown2

@jinjafilter
def markdown(value):
return markdown2.markdown(value)
3 changes: 3 additions & 0 deletions markdownfilter/models.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from django.db import models

# Create your models here.
1 change: 1 addition & 0 deletions markdownfilter/views.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Create your views here.
1 change: 1 addition & 0 deletions settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,5 +75,6 @@
'django.contrib.admin',
'django.contrib.admindocs',
'tsp.versionedassets',
'tsp.markdownfilter',
'tsp.projects',
)
4 changes: 4 additions & 0 deletions templates/sandbox.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,8 @@

<p>This is my page for just playing around with things.</p>

{% filter markdown %}
**boo**
{% endfilter %}

{% endblock %}

0 comments on commit 748fcb2

Please sign in to comment.