Template render syntax fix

This commit is contained in:
adi 2016-08-15 13:24:55 +02:00
parent c329577d44
commit 3f46bddf21
3 changed files with 8 additions and 6 deletions

View file

@ -317,6 +317,10 @@ $('.markdownx').on('markdownx.update', function(e, response) {
# Changelog
###### v1.6.1
* Template render syntax fix
###### v1.6
* Support for Django's `default_storage`

View file

@ -1,5 +1,4 @@
from django import forms
from django.template import Context
from django.template.loader import get_template
from django.contrib.admin import widgets
@ -26,13 +25,12 @@ class MarkdownxWidget(forms.Textarea):
widget = super(MarkdownxWidget, self).render(name, value, attrs)
t = get_template('markdownx/widget.html')
c = Context({
template = get_template('markdownx/widget.html')
return template.render({
'markdownx_editor': widget,
})
return t.render(c)
class Media:
js = (
'markdownx/js/markdownx.js',

View file

@ -10,7 +10,7 @@ def get_requirements():
setup(
name='django-markdownx',
version='1.6',
version='1.6.1',
packages=find_packages(),
include_package_data=True,
description='Django Markdownx is a Markdown editor built for Django. It enables raw editing, live preview and image uploads (stored in `MEDIA` folder) with drag&drop functionality and auto tag insertion.',