mirror of
https://github.com/Hopiu/django-markdownx.git
synced 2026-03-16 21:40:24 +00:00
Template render syntax fix
This commit is contained in:
parent
c329577d44
commit
3f46bddf21
3 changed files with 8 additions and 6 deletions
|
|
@ -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`
|
||||
|
|
|
|||
|
|
@ -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',
|
||||
|
|
|
|||
2
setup.py
2
setup.py
|
|
@ -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.',
|
||||
|
|
|
|||
Loading…
Reference in a new issue