diff --git a/django_markdown/templates/django_markdown/preview.html b/django_markdown/templates/django_markdown/preview.html index 705546e..aea93ab 100644 --- a/django_markdown/templates/django_markdown/preview.html +++ b/django_markdown/templates/django_markdown/preview.html @@ -7,7 +7,7 @@ -{{ params.content|markdown }} +{{ content|markdown }} diff --git a/django_markdown/urls.py b/django_markdown/urls.py index c3f4f53..fae10db 100644 --- a/django_markdown/urls.py +++ b/django_markdown/urls.py @@ -1,4 +1,4 @@ -from django.conf.urls.defaults import url, patterns +from django.conf.urls import patterns, url from django_markdown.views import preview diff --git a/django_markdown/views.py b/django_markdown/views.py index 86f5ef4..e223e8f 100644 --- a/django_markdown/views.py +++ b/django_markdown/views.py @@ -1,7 +1,7 @@ -from django.views.generic.simple import direct_to_template +from django.shortcuts import render def preview(request): - return direct_to_template( + return render( request, 'django_markdown/preview.html', content=request.REQUEST.get('data', 'No content posted'))